skills/chrysaliscat/designgraduation/Web Test Case Generator

Web Test Case Generator

SKILL.md

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.
Weekly Installs
0
First Seen
Jan 1, 1970