@rheeproduction/automock
v1.0.0
Published
Context-Aware Smart Mocking Engine
Maintainers
Readme
_ _ _
/ \ _ _| |_ ___ _ __ ___ ___ ___| | __
/ _ \| | | | __/ _ \| '_ ` _ \ / _ \ / __| |/ // ___ \ || | || () | | | | | | () | (__| < // __,|____/|| || ||_/ _|_|_\
Automock 🚀
No more manual mocking.
더 이상의 수동 모킹은 없습니다.
Automock is a context-aware smart mocking engine that transforms your development workflow by automatically generating realistic, stateful mock data based on your OpenAPI specifications and code context.
Automock은 OpenAPI 명세와 코드 문맥을 분석하여 실제와 같은 유동적인 모킹 데이터를 자동으로 생성해주는 '맥락 인식형 스마트 모킹 엔진'입니다. 개발자의 워크플로우를 혁명적으로 단축시킵니다.
🌟 Key Features (주요 기능)
1. Zero-Configuration Mocking (무설정 모킹)
Just provide your OpenAPI URL. Automock intercepts fetch or axios calls and returns data that matches the specification immediately.
OpenAPI URL만 연결하세요. Automock이 fetch나 axios 호출을 가로채서 명세에 맞는 데이터를 즉시 반환합니다.
2. Contextual Intelligence (문맥 인식 지능)
It's not just random strings. If a field name is userName, it gives you a real name. If it's address, it gives you a formatted address.
단순한 랜덤 문자열이 아닙니다. 변수명이 userName이면 실제 사람 이름을, address면 실제 주소 형식을 제공합니다.
3. Stateful Mocking (상태 유지형 모킹) ⚡ Revolutionary!
Automock maintains local state. If you POST a new user, a subsequent GET /users will include that new user in the list.
로컬 상태를 유지합니다. 유저를 POST로 생성했다면, 이후 GET /users 호출 시 방금 생성한 유저가 포함된 리스트를 반환합니다.
4. Edge Case Simulator (엣지 케이스 시뮬레이터)
Randomly simulate 500 errors, network delays, or empty responses to test your app's resilience with a single option. "가끔 500 에러 던지기", "네트워크 지연", "빈 배열 반환" 등의 시나리오를 옵션 하나로 실행하여 앱의 견고함을 테스트합니다.
🛠 Tech Stack (기술 스택)
- MSW (Mock Service Worker): Network interception at the browser/node level. (브라우저 및 노드 레벨의 네트워크 요청 가로채기)
- faker.js: Realistic data generation engine. (실제와 같은 데이터 생성 엔진)
- zod: Runtime schema validation and data definition. (런타임 스키마 검증 및 데이터 정의)
🚀 Quick Start (빠른 시작)
npm install @rheeproduction/automockimport { Automock } from '@rheeproduction/automock';
// Initialize with your OpenAPI spec
// OpenAPI 명세로 초기화
Automock.init({
openapi: 'https://api.example.com/swagger.json',
stateful: true, // Enable local state (상태 유지 활성화)
chaos: {
errorRate: 0.1, // 10% chance of error (10% 확률로 에러 발생)
delay: 'random' // Random network delay (랜덤 네트워크 지연)
}
});📄 License (라이선스)
Copyright (c) 2008-2026 Rheehose (Rhee Creative). Licensed under the MIT License.
본 프로젝트는 MIT 라이선스 하에 배포됩니다. ⓒ 2008-2026 Rheehose (Rhee Creative).
