web test case generator

📁 chrysaliscat/designgraduation 📅 Jan 1, 1970
1
总安装量
0
周安装量
#43127
全站排名
安装命令
npx skills add https://github.com/chrysaliscat/designgraduation --skill Web Test Case Generator

Skill 文档

Web Test Case Generator

Purpose

Analyzes frontend components (.vue, .jsx) and business requirements to generate comprehensive test plans.

Strategy

1. Component Analysis

Input: Login.vue

  • Props: Identify required props -> Test missing/invalid props.
  • Events: Identify emit -> Test interaction triggers event.
  • State: Identify v-if/v-show -> Test conditional rendering.

2. E2E Scenario Generation

Input: “User Checkout Flow”

  1. Entry Point: Home Page -> Product Page.
  2. Action: Click “Add to Cart”.
  3. Validation: Cart count increases.
  4. Checkout: Proceed to payment.
  5. Success: Order confirmation shown.

Commands

generate_component_test

Prompt: “Generate unit tests for src/views/agri/cart/index.vue using Vue Test Utils.” Action:

  1. Read file content.
  2. Identify user interactions (clicks, inputs).
  3. Mock API calls (@/api/agri/order).
  4. Output cart.spec.js.

generate_e2e_test

Prompt: “Generate Playwright E2E test for the checkout process.” Action:

  1. Map out user journey.
  2. Define test('checkout flow', ...) skeleton.
  3. Fill in steps with robust locators.