qa-api
[Testing] REST API & GraphQL xAPI — reference lookup, test execution, and test case generation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
[Testing] REST API & GraphQL xAPI — reference lookup, test execution, and test case generation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
[Testing] Review test cases for quality, determinism, completeness, data validity, coverage gaps, duplication, live environment verification, and behavioral triangulation against docs + live + source. Delegates browser verification to qa-testing-expert; triangulation to ba-system-analyzer.
[Testing] Postman MCP collections — create, configure, verify, and export collections with proper variables, auth, and endpoints
[Testing] Autonomous test coverage gap analysis and generation — identifies missing test cases, generates enriched CSV test cases, validates P0 cases via browser, and reports improvements. Single-agent counterpart to /qa-coverage-generation.
Repo/tracker routing library for the vc-fix plugin — decides which external product repo owns a bug (client vs platform), whether the fix delivers as a direct PR, a fork-PR, or an upstream issue, and which VCS/tracker host to talk to. Used by /qa-fix and /project-init. Self-contained — no dependency on the ci/ directory.
Build, launch, smoke-test, and health-check the vc-mcp-testing-module agentic QA tooling repo. Use when asked to run, start, verify, smoke-test, or sanity-check this repo's tooling — env:check, @td() resolution, suite manifest sync, critical-UI-scope, seed dry-run, GraphQL fixture validation — or before running regression.
[QA Methodology] Triage a completed regression run's failures: collect each FAIL + its evidence (trace, screenshots, console, network) + failing CSV row, dedup + flag flaky, classify each into real-product-bug vs test-defect (bad steps / bad assertion / stale test data / stale test) vs flaky/env/known, live-verify the real ones, then route test-defects to /qa-review-tests --fix and draft bug reports. Detect-classify-verify-report only — never files a tracker ticket, never triggers /qa-fix.
| name | qa-api |
| description | [Testing] REST API & GraphQL xAPI — reference lookup, test execution, and test case generation. |
| argument-hint | ref <module> | test <scope> | cases <scope> |
| disable-model-invocation | true |
Three modes in one skill: look up API reference, execute tests, or write test cases.
/qa-api ref xCart # Look up xCart GraphQL queries & mutations
/qa-api ref xCatalog # Look up xCatalog product/category queries
/qa-api ref auth # Authentication token flow reference
/qa-api ref pageContext # xFrontend pageContext query reference
/qa-api ref store # Store settings & StoreResponseType fields
/qa-api test catalog # Execute REST catalog API tests (Suite 14 subset)
/qa-api test graphql cart # Execute xCart GraphQL mutation tests (Suite 15 subset)
/qa-api test auth # Execute authentication endpoint tests
/qa-api test full # Execute full API test suite (Suite 14 + Suite 15)
/qa-api cases xCart addCoupon # Write test cases for addCoupon mutation
/qa-api cases REST catalog CRUD # Write test cases for catalog REST CRUD
/qa-api cases auth # Write test cases for auth endpoints
/qa-api cases graphql error-handling # Write test cases for GraphQL error scenarios
cases mode.knowledge/api/graphql-schema.md — Authoritative live introspection snapshot of the GraphQL schema. Lists all queries, mutations, input types, return types, and key rules. Consult this FIRST when writing or reviewing any GraphQL test case.knowledge/api/graphql-test-cases-runner.md — Authoritative authoring contract for runner-native GraphQL test cases (the format consumed by scripts/graphql/graphql-runner.ts): full Steps / Assertions / Cleanup tag grammar, predicate shapes, getByPath filter syntax, @td() resolver, capture chaining, common failure modes, authoring checklist, worked example. Read this BEFORE writing ANY GraphQL test case; gold-standard reference suite is regression/suites/Backend/graphql/050i-graphql-configurations.csv.skills/qa-postman/test-data-fixtures.md — @td(ALIAS.field) resolver, test-data/aliases.json registry, and fixture conventions. Read this BEFORE writing entity IDs, SKUs, prices, emails, addresses, or test-card numbers into request bodies — resolve at authoring time, never hardcode.skills/qa-postman/SKILL.md — Postman MCP entry point (modes, workflow, sub-guide index). The Postman MCP authors collections; it does not execute them — execution happens via Newman/Postman CLI/Postman Monitor (see qa-postman/execution.md).NEVER write a GraphQL query, mutation, or filter without verifying it exists in the schema first. Do not guess field names, mutation names, argument types, or filter syntax.
Before writing ANY GraphQL test case:
{ __schema { queryType { fields { name args { name } } } } } — list all queries{ __schema { mutationType { fields { name args { name } } } } } — list all mutations{ __type(name: "TypeName") { fields { name type { name ofType { name } } } } } — check return fields{ __type(name: "InputTypeName") { inputFields { name type { name ofType { name } kind } } } } — check input fieldsxapi-query-ref.md for known-good query templates/virtocommerce/vc-docs) for any operations not in the local refSchema reference: Consult knowledge/api/graphql-schema.md — live introspection snapshot with all queries, mutations, input types, and return types. Key rules from the schema:
CartType has flat money fields (subTotal, total, discountTotal) — NOT nested under totalstotal — there is NO grandTotalquery arg — NOT keyword (only brands uses keyword)MoneyType = { amount currency { code } } — NOT { amount currencyCode }userId is required per schema type but inferred from auth token — omit in variables when authenticatedCommon mistakes that introspection prevents:
removeItem vs removeCartItem)InputConfigurationSectionType vs ConfigurationSectionInput)totals { grandTotal { amount } } — WRONG. Use total { amount } directlyproducts(keyword: "...") — WRONG. Use products(query: "...")filter: "slug:..." — doesn't exist)textValue vs customText, configurationSections vs configurationSection)ref — API Reference Lookupxapi-query-ref.md for the requested module or operation/virtocommerce/vc-docs) for any fields not in the local refxAPI Modules:
| Module | Purpose | Key Operations |
|---|---|---|
| xCart | Shopping cart | addItem, removeItem, changeItemQuantity, addCoupon, clearCart, addOrUpdateShipment, addOrUpdatePayment |
| xCatalog | Products & categories | products, product, categories, searchProducts |
| xOrder | Order management | createOrderFromCart, orders, order, changeOrderStatus |
| xCMS | Content management | pages, menus, contentItems |
| xProfile | User profiles & orgs | me, organization, contacts, updateProfile |
| xFrontend | Storefront bootstrap | pageContext (store + user + slug + white-labeling in one call) |
REST API Sections:
| Section | Base Path |
|---|---|
| Authentication | /connect/token |
| Catalog | /api/catalog/ |
| Pricing | /api/pricing/ |
| Inventory | /api/inventory/ |
| Orders | /api/order/ |
| Customers | /api/contacts/, /api/members/ |
| Marketing | /api/marketing/ |
| Platform | /api/platform/ |
| Search | /api/search/ |
| Stores | /api/stores/ |
Rules:
{BACK_URL}/graphqlerrors[] in GraphQL responses — HTTP 200 ≠ successskip + take → totalCount in responseAuthorization: Bearer {token}test — Execute TestsDelegate to qa-backend-expert agent with scope and credentials.
graphql, or fulltest-cases-api-graphql.mdqa-backend-expert via Task tool:
BACK_URL, ADMIN_EMAIL, ADMIN_PASSWORD from environmentbrowser_evaluate fetch, curl, npx tsx scripts/graphql/graphql-runner.ts (for runner-native GraphQL CSVs), or a Postman collection authored via Postman MCP and executed with Newman/Postman CLI. The Postman MCP itself does not execute collections — see qa-postman/execution.md.REST API (Suite 14) coverage:
GraphQL xAPI (Suite 15) coverage:
cases — Write Test CasesGenerate test cases in enriched CSV format for test-management-specialist.
api-test-case-patterns.md for coverage checklists and tag referencexapi-query-ref.md for known-good query/mutation templates — cross-check against introspection[HTTP]/[AUTH]/[SETUP] tags; GraphQL → use [GQL]/[VAR] tags)api-test-case-patterns.md for the requested scopeID, Title, Section, Priority, Business_Rule, Edge_Case_Refs, Preconditions, Test_Data, Steps, Assertions, Cross_Layer_Checks, Failure_Signals, Cleanup, References, Automation_Statusnpm run suites:append -- <suite.csv> --rows <new.csv>
(scripts/test-cases/append-test-cases-to-suite.ts): schema + boundary-newline + dedup + round-trip verified. Never
hand-roll the append. Review the generated rows first with npm run suites:review -- <new.csv>.Key rules for API test cases:
[API] errors[] is empty in Cross_Layer_ChecksFailure_Signals (timeout signal + API error signal)[ROUNDTRIP] cross-layer check: mutate then query to confirm persistenceTest_Data column: {{VAR}} bindings only — no freeform text[STATUS] assertions for REST, [ERRORS] + [DATA] for GraphQLKey rules for GraphQL queries/mutations in Steps:
command: input pattern: mutation { mutationName(command: { ...fields }) { ...return } }mutation { addItem(cartId: "...", productId: "...") is WRONGstoreId! in the command; userId! is required per schema type but inferred from auth tokensubTotal { amount }, total { amount } — NOT totals { grandTotal { amount } }grandTotal — the field is totalquery arg — NOT keywordremoveCartItem not removeItem, changeCartItemQuantity not changeItemQuantity)knowledge/api/graphql-schema.md for authoritative field names and types{ amount currency { code } }, not just { amount }). Null checks, type correctness, and nested resolver correctness are only observable when fields are in the selection set. Minimal selection ({ id }, { totalCount }) is allowed ONLY for: (a) counter/invariant probes before/after a mutation, (b) cross-layer roundtrips that match a write, (c) the dedicated "minimal selection" schema-coverage test (one per operation, per the tier rule in graphql-checklist.md:141-144). When using a minimal selection, add a comment in Steps naming the role.Always use env vars — never hardcode URLs or credentials:
BACK_URL — platform backend URLADMIN_EMAIL, ADMIN_PASSWORD — admin credentialsUSER_EMAIL, USER_PASSWORD — regular user credentialsSTORE_ID — store identifierCULTURE_NAME — default en-USCURRENCY_CODE — default USD@td(), Don't HardcodeSame rule applies to entity IDs, SKUs, prices, emails, addresses, coupon codes, test cards, order numbers, and URL path segments — resolve them at authoring time via the project's test-data library. Hardcoding rots: catalogs get re-seeded, orgs get re-created, prices change.
@td(ALIAS.field) → looks up test-data/aliases.json, reads the matching CSV row, returns the requested column. Examples: @td(CYBERSOURCE_VISA.number), @td(STORE_PRIMARY.id), @td(ACME_ADMIN.email), @td(CFG_LAPTOP.id).scripts/lib/test-data-resolver.ts, consumed by scripts/graphql/graphql-runner.ts and the regression suite parsers.npx tsx scripts/test-data/validate-td-refs.ts — verifies every @td() reference resolves.../qa-postman/test-data-fixtures.md covers full conventions (catalog/address/account gotchas, fixture directory layout).