Auto-QA: 자율 의도 기반 QA 엔진
모든 웹 애플리케이션(로컬 개발 서버 또는 라이브 웹사이트)에 대해 일반 영어 인간 의도, 셀프 힐링 W3C 접근성 휴리스틱, 능동적 모달 격리 및 네이티브 @playwright/test 컴파일을 사용하여 엔드투엔드 사용자 여정을 실행하는 자율 웹 QA 테스트 도구체인입니다.
1. 이중 모드 작동 결정 규칙
조치를 취하기 전에 선언된 도구를 검사하십시오:
- 모드 1: MCP 도구 모드:
auto_qa_로 시작하는 도구(예:auto_qa_execute_and_heal)가 활성 도구 목록에 있으면 JSON-RPC를 통해 직접 호출하십시오. - 모드 2: 안티그래비티 스킬 CLI 모드(기본값 및 독립 실행형):
auto_qa_*MCP 도구가 선언되지 않은 경우, 통합 CLI를 사용하여run_command를 통해 모든 QA 작업을 실행하십시오:(node "<skillPath>/scripts/cli.js" <command><skillPath>를~/.gemini/config/skills/auto-qa또는 리포지토리 루트로 확인하십시오).
2. 3단계 테스트 수명 주기
1단계: 표면 검색(액세스 가능한 컨트롤 매핑)
대상 URL을 크롤링하여 대화형 버튼, 입력, 링크 및 모달 대화상자를 추출합니다.
- MCP 모드:
auto_qa_generate_code_summary(projectPath, url)를 호출합니다. - 스킬 CLI 모드:
node "<skillPath>/scripts/cli.js" discover http://localhost:3000 -o auto_qa_tests/tmp/surface.json
2단계: 의도 계획 작성(auto_qa_frontend_test_plan.json)
선언적 테스트 계획을 auto_qa_tests/auto_qa_frontend_test_plan.json에 작성합니다.
- MCP 모드:
auto_qa_generate_frontend_test_plan(projectPath, name, planSteps)를 호출합니다. - 스킬 CLI 모드: 파일 생성 도구를 사용하여 JSON 파일을 직접 작성합니다:
{
"$schema": "https://raw.githubusercontent.com/TestSprite/testsprite-cli/main/schemas/plan.schema.json",
"projectId": "project-name",
"type": "frontend",
"name": "사용자 등록 및 로그인 흐름",
"targetUrl": "http://localhost:3000",
"priority": "p0",
"planSteps": [
{ "type": "action", "description": "navigate to http://localhost:3000/login" },
{ "type": "action", "description": "type '[email protected]' into 'Email'" },
{ "type": "action", "description": "type 'TestPass123!' into 'Password'" },
{ "type": "action", "description": "click 'Sign In'" },
{ "type": "assertion", "description": "verify 'Dashboard' is visible" },
{ "type": "assertion", "description": "verify URL contains '/dashboard'" }
]
}
지원되는 의도 동사(대소문자 구분 없음, 작은따옴표 또는 큰따옴표):
- 작업:
navigate to <http(s)://url>/go to </path or http(s)://url>type '<text>' into '<target>'/fill '<text>' into '<target>'click '<target>'/press '<target>'select '<option>' from '<target>'check '<target>'/tick '<target>'
- 어설션:
verify '<target>' is visible/appearsverify '<target>' is not visible/disappearsverify text '<text>'/contains '<text>'verify URL contains '<path>'
3단계: 실행, 셀프 힐링 및 코드 컴파일
셀프 힐링 요소 해결로 선언적 테스트 계획을 실행하고, 실패 스크린샷을 캡처하며, 네이티브 코드를 내보냅니다.
- MCP 모드:
- 실행:
auto_qa_execute_and_heal(projectPath, planFile, baseUrl) - 내보내기:
auto_qa_compile_to_playwright(planPath, outputPath)
- 실행:
- 스킬 CLI 모드:
- 테스트 실행:
(참고: 종료 코드 1은 테스트 중 어설션 실패를 나타냅니다.node "<skillPath>/scripts/cli.js" run auto_qa_tests/auto_qa_frontend_test_plan.json -u http://localhost:3000auto_qa_tests/artifacts/에서 스크린샷을,auto_qa_tests/auto-qa-test-report.md에서 단계 타이밍 및 오류 추적을 확인하십시오). - 네이티브 Playwright TypeScript로 컴파일:
node "<skillPath>/scripts/cli.js" compile auto_qa_tests/auto_qa_frontend_test_plan.json -o tests/e2e/flow.spec.ts
- 테스트 실행:
3. CLI 하위 명령 요약
| 하위 명령 | 목적 | 기본 출력 |
|---|---|---|
doctor | Node, Playwright 및 Chromium 바이너리에 대한 사전 점검. | 터미널 상태 |
discover <url> [-o <file>] | 웹사이트를 크롤링하고 버튼, 입력, 링크, 모달 및 접근성 트리를 추출합니다. | JSON 표면 맵 |
run <planFile> [-u <url>] [-o <dir>] | 셀프 힐링 해결로 의도 계획을 실행합니다. | auto_qa_tests/artifacts/ + auto-qa-test-report.md |
compile <planFile> [-o <file>] | 선언적 계획을 네이티브 @playwright/test .spec.ts로 컴파일합니다. | <planName>.spec.ts |
bootstrap [dir] [-u <url>] | auto_qa_tests/tmp/config.json을 초기화합니다. | config.json |
mcp | stdio JSON-RPC 2.0 MCP 서버를 시작합니다. | stdio 스트림 |
4. 5계층 검증 전략
*"모든 것을 테스트"*하거나 익숙하지 않은 웹 애플리케이션을 감사하라는 요청을 받으면:
- 1계층: 네비게이션 및 경로: 네비게이션 바 및 바닥글 링크를 크롤링합니다. 404 응답이 없는지 확인합니다.
- 2계층: 대화형 컨트롤: 드롭다운, 아코디언, 테마 토글 및 필터 버튼을 테스트합니다.
- 3계층: 양식 검증 퍼널:
- 정상 경로: 유효한 입력 제출 → 성공 배너 또는 상태 업데이트 확인.
- 오류 경로: 빈 필수 필드 제출 → 인라인 검증 알림 확인.
- 4계층: 인증 수명 주기: 유효한 로그인, 잘못된 자격 증명 거부, 세션 지속성 및 로그아웃.
- 5계층: 핵심 CRUD 워크플로우: 항목 생성 → 목록에 표시되는지 확인. 항목 수정 → 업데이트 확인. 항목 삭제 → 제거 확인.