chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [language] | --javascript | --java | --python | --rust | --go | --csharp
|
||||
description: Setup comprehensive mutation testing with framework selection and CI integration
|
||||
---
|
||||
|
||||
# Add Mutation Testing
|
||||
|
||||
Setup mutation testing framework with quality metrics and CI integration: **$ARGUMENTS**
|
||||
|
||||
## Current Testing Context
|
||||
|
||||
- Language: !`find . -name "*.js" -o -name "*.ts" | head -1 >/dev/null && echo "JavaScript/TypeScript" || find . -name "*.py" | head -1 >/dev/null && echo "Python" || find . -name "*.java" | head -1 >/dev/null && echo "Java" || echo "Multi-language"`
|
||||
- Test coverage: !`find . -name "coverage" -o -name ".nyc_output" | head -1 || echo "No coverage data"`
|
||||
- Test framework: !`grep -l "jest\\|mocha\\|pytest\\|junit" package.json pom.xml setup.py 2>/dev/null | head -1 || echo "Detect from tests"`
|
||||
- CI system: !`find . -name ".github" -o -name ".gitlab-ci.yml" -o -name "Jenkinsfile" | head -1 || echo "No CI detected"`
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive mutation testing with framework optimization and quality gates:
|
||||
|
||||
**Language Focus**: Use $ARGUMENTS to specify JavaScript, Java, Python, Rust, Go, C#, or auto-detect from codebase
|
||||
|
||||
**Mutation Testing Framework**:
|
||||
|
||||
1. **Tool Selection & Setup** - Choose framework (Stryker, PIT, mutmut, cargo-mutants), install dependencies, configure basic settings, validate installation
|
||||
2. **Mutation Operator Configuration** - Configure arithmetic operators, relational operators, logical operators, conditional boundaries, statement mutations
|
||||
3. **Performance Optimization** - Setup parallel execution, configure incremental testing, optimize file filtering, implement caching strategies
|
||||
4. **Quality Metrics** - Configure mutation score calculation, setup survival analysis, implement threshold enforcement, track effectiveness trends
|
||||
5. **CI/CD Integration** - Automate execution triggers, configure performance monitoring, setup result reporting, implement deployment gates
|
||||
6. **Result Analysis** - Setup visualization dashboards, configure surviving mutant analysis, implement remediation workflows, track regression patterns
|
||||
|
||||
**Advanced Features**: Selective mutation testing, performance profiling, automated test improvement suggestions, mutation trend analysis, quality gate integration.
|
||||
|
||||
**Framework Support**: Language-specific optimizations, tool ecosystem integration, performance tuning, reporting customization.
|
||||
|
||||
**Output**: Complete mutation testing setup with configured framework, CI integration, quality thresholds, and analysis workflows.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [language] | --javascript | --python | --java | --haskell | --rust | --clojure
|
||||
description: Implement property-based testing with framework selection and invariant identification
|
||||
---
|
||||
|
||||
# Add Property-Based Testing
|
||||
|
||||
Implement property-based testing framework with invariant analysis and test generation: **$ARGUMENTS**
|
||||
|
||||
## Current Testing Context
|
||||
|
||||
- Language: !`find . -name "*.js" -o -name "*.ts" | head -1 >/dev/null && echo "JavaScript/TypeScript" || find . -name "*.py" | head -1 >/dev/null && echo "Python" || echo "Multi-language"`
|
||||
- Test framework: !`find . -name "jest.config.*" -o -name "pytest.ini" | head -1 || echo "Detect framework"`
|
||||
- Mathematical functions: Analysis of codebase for property-testable functions
|
||||
- Business logic: Identification of invariants and properties in domain logic
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive property-based testing with invariant analysis and automated test generation:
|
||||
|
||||
**Language Focus**: Use $ARGUMENTS to specify JavaScript, Python, Java, Haskell, Rust, Clojure, or auto-detect from codebase
|
||||
|
||||
**Property-Based Testing Framework**:
|
||||
|
||||
1. **Framework Selection** - Choose appropriate tool (fast-check, Hypothesis, QuickCheck, proptest), install dependencies, configure integration
|
||||
2. **Property Identification** - Analyze mathematical properties, identify business invariants, discover symmetries, evaluate round-trip properties
|
||||
3. **Generator Design** - Create custom data generators, implement constraint-based generation, design composite generators, optimize generation strategies
|
||||
4. **Property Implementation** - Write property tests, implement preconditions, design postconditions, create invariant checks
|
||||
5. **Shrinking Configuration** - Configure test case shrinking, optimize failure minimization, implement custom shrinkers, enhance debugging
|
||||
6. **Integration & Reporting** - Integrate with existing test suite, configure reporting, setup CI integration, optimize execution performance
|
||||
|
||||
**Advanced Features**: Stateful property testing, model-based testing, custom generators, parallel property execution, performance property testing.
|
||||
|
||||
**Quality Assurance**: Property completeness analysis, edge case coverage, performance optimization, maintainability assessment.
|
||||
|
||||
**Output**: Complete property-based testing setup with identified properties, custom generators, integrated test suite, and performance optimization.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [framework] | --cypress | --playwright | --webdriver | --puppeteer | --mobile
|
||||
description: Configure comprehensive end-to-end testing suite with framework selection and CI integration
|
||||
---
|
||||
|
||||
# E2E Setup
|
||||
|
||||
Configure comprehensive end-to-end testing suite with framework optimization: **$ARGUMENTS**
|
||||
|
||||
## Current E2E Context
|
||||
|
||||
- Application type: !`find . -name "index.html" -o -name "app.js" -o -name "App.tsx" | head -1 && echo "Web app" || echo "Detect app type"`
|
||||
- Framework: !`grep -l "react\\|vue\\|angular" package.json 2>/dev/null || echo "Detect framework"`
|
||||
- Existing tests: !`find . -name "cypress" -o -name "playwright" -o -name "e2e" | head -1 || echo "No E2E setup"`
|
||||
- CI system: !`find . -name ".github" -o -name ".gitlab-ci.yml" | head -1 || echo "No CI detected"`
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive end-to-end testing with framework selection and optimization:
|
||||
|
||||
**Framework Focus**: Use $ARGUMENTS to specify Cypress, Playwright, WebDriver, Puppeteer, mobile testing, or auto-detect best fit
|
||||
|
||||
**E2E Testing Framework**:
|
||||
|
||||
1. **Framework Selection & Setup** - Choose optimal E2E tool, install dependencies, configure basic settings, setup project structure
|
||||
2. **Test Environment Configuration** - Setup test environments, configure base URLs, implement environment switching, optimize test isolation
|
||||
3. **Page Object Patterns** - Design page object model, create reusable components, implement element selectors, optimize maintainability
|
||||
4. **Test Data Management** - Setup test data strategies, implement fixtures, configure database seeding, design cleanup procedures
|
||||
5. **Cross-Browser Testing** - Configure multi-browser execution, setup mobile testing, implement responsive testing, optimize compatibility
|
||||
6. **CI/CD Integration** - Configure automated execution, setup parallel testing, implement reporting, optimize performance
|
||||
|
||||
**Advanced Features**: Visual regression testing, accessibility testing, performance monitoring, API testing integration, mobile device testing.
|
||||
|
||||
**Quality Assurance**: Test reliability optimization, flaky test prevention, execution speed optimization, debugging capabilities.
|
||||
|
||||
**Output**: Complete E2E testing setup with framework configuration, test suites, CI integration, and maintenance workflows.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [target] | [scope] | --unit | --integration | --edge-cases | --automatic
|
||||
description: Generate comprehensive test cases with automatic analysis and coverage optimization
|
||||
---
|
||||
|
||||
# Generate Test Cases
|
||||
|
||||
Generate comprehensive test cases with automatic analysis and intelligent coverage: **$ARGUMENTS**
|
||||
|
||||
## Current Test Generation Context
|
||||
|
||||
- Target code: Analysis of $ARGUMENTS for test case generation requirements
|
||||
- Test framework: !`find . -name "jest.config.*" -o -name "*.test.*" | head -1 && echo "Jest/Vitest detected" || echo "Detect framework"`
|
||||
- Code complexity: !`find . -name "*.js" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}' || echo "0"` lines of code
|
||||
- Existing patterns: !`find . -name "*.test.*" -o -name "*.spec.*" | head -3` test file patterns
|
||||
|
||||
## Task
|
||||
|
||||
Execute intelligent test case generation with comprehensive coverage and optimization:
|
||||
|
||||
**Generation Scope**: Use $ARGUMENTS to specify target file, unit tests, integration tests, edge cases, or automatic comprehensive generation
|
||||
|
||||
**Test Case Generation Framework**:
|
||||
|
||||
1. **Code Structure Analysis** - Parse function signatures, analyze control flow, identify branching paths, assess complexity metrics
|
||||
2. **Test Pattern Recognition** - Analyze existing test patterns, identify testing conventions, extract reusable patterns, optimize consistency
|
||||
3. **Input Space Analysis** - Identify parameter domains, analyze boundary conditions, discover edge cases, evaluate error conditions
|
||||
4. **Test Case Design** - Generate positive test cases, negative test cases, boundary value tests, equivalence class tests
|
||||
5. **Mock Strategy Planning** - Identify external dependencies, design mock implementations, create test data factories, optimize test isolation
|
||||
6. **Coverage Optimization** - Ensure path coverage, optimize test efficiency, eliminate redundancy, maximize testing value
|
||||
|
||||
**Advanced Features**: Automatic edge case discovery, intelligent input generation, test data synthesis, coverage gap analysis, performance test generation.
|
||||
|
||||
**Quality Assurance**: Test maintainability, execution performance, assertion quality, debugging effectiveness.
|
||||
|
||||
**Output**: Comprehensive test case suite with optimized coverage, intelligent mocking, proper assertions, and maintenance guidelines.
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [file-path] | [component-name]
|
||||
description: Generate a complete test file for a specified source file or component. Use when the user explicitly asks to write, create, or generate tests for a specific file.
|
||||
---
|
||||
|
||||
# Generate Tests
|
||||
|
||||
Generate comprehensive test suite for: $ARGUMENTS
|
||||
|
||||
## Current Testing Setup
|
||||
|
||||
- Test framework: !`cat package.json 2>/dev/null | grep -E '"jest"|"vitest"|"mocha"|"jasmine"' | head -3 || cat jest.config.* vitest.config.* 2>/dev/null | head -5 || echo "Framework not detected"`
|
||||
- Existing tests: !`find . -name "*.test.*" -o -name "*.spec.*" | head -5`
|
||||
- Test coverage: !`npm run test:coverage 2>/dev/null || echo "No coverage script"`
|
||||
- Target: if $ARGUMENTS is a file path, read it with @$ARGUMENTS; if it is a component name, search for it with Grep before writing tests
|
||||
|
||||
## Test Generation Framework
|
||||
|
||||
1. **Analyze** the target file/component structure — identify all exported functions, classes, methods, and their signatures
|
||||
2. **Strategy** — examine existing test patterns in the project; choose unit vs integration scope; identify critical paths and error scenarios
|
||||
3. **Mock Design** — map all external dependencies (I/O, APIs, timers, dates); create factories for test data; plan cleanup for async operations
|
||||
4. **Unit Tests** — write isolated tests per function/method covering happy path, edge cases, and error conditions; follow AAA pattern (Arrange, Act, Assert)
|
||||
5. **Integration Tests** — test component interactions, API layers with mocked responses, and end-to-end user workflows where applicable
|
||||
6. **Quality Check** — verify naming describes behavior not implementation; confirm 80%+ coverage on critical business logic; ensure test isolation
|
||||
|
||||
## Framework-Specific Guidance
|
||||
|
||||
- **React**: Component testing with React Testing Library; test user interactions and rendering
|
||||
- **Vue**: Component testing with Vue Test Utils; test props, events, and slots
|
||||
- **Angular**: Component and service testing with TestBed; test dependency injection
|
||||
- **Node.js**: API endpoint and middleware testing; test request/response cycles
|
||||
- **Python**: `pytest` with fixtures, `unittest.mock` for patching, `pytest-cov` for coverage
|
||||
- **Go**: Table-driven tests in `_test.go` files, `testify/assert` for assertions, subtests via `t.Run()`
|
||||
- **Rust**: `#[cfg(test)]` modules, `#[test]` attributes, `mockall` for mocking
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Follow AAA pattern (Arrange, Act, Assert)
|
||||
- 80%+ coverage; prioritize critical business logic and error paths
|
||||
- Mock external I/O; use factories for test data
|
||||
- Naming: describe what the function does, not implementation details
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [scope] | --unit | --integration | --e2e | --visual | --performance | --full-stack
|
||||
description: Setup complete testing infrastructure with framework configuration and CI integration
|
||||
---
|
||||
|
||||
# Setup Comprehensive Testing
|
||||
|
||||
Setup complete testing infrastructure with multi-layer testing strategy: **$ARGUMENTS**
|
||||
|
||||
## Current Testing Infrastructure
|
||||
|
||||
- Project type: !`[ -f package.json ] && echo "Node.js" || [ -f requirements.txt ] && echo "Python" || [ -f pom.xml ] && echo "Java" || echo "Multi-language"`
|
||||
- Existing tests: !`find . -name "*.test.*" -o -name "*.spec.*" | wc -l` test files
|
||||
- CI system: !`find . -name ".github" -o -name ".gitlab-ci.yml" -o -name "Jenkinsfile" | head -1 || echo "No CI detected"`
|
||||
- Framework: !`grep -l "jest\\|vitest\\|pytest\\|junit" package.json requirements.txt pom.xml 2>/dev/null | head -1 || echo "Detect framework"`
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive testing infrastructure with multi-layer testing strategy:
|
||||
|
||||
**Setup Scope**: Use $ARGUMENTS to focus on unit, integration, e2e, visual, performance testing, or full-stack implementation
|
||||
|
||||
**Comprehensive Testing Framework**:
|
||||
|
||||
1. **Testing Strategy Design** - Analyze project requirements, define testing pyramid, plan coverage goals, optimize testing investment
|
||||
2. **Unit Testing Setup** - Configure primary framework (Jest, Vitest, pytest), setup test runners, implement test utilities, optimize execution
|
||||
3. **Integration Testing** - Setup integration test framework, configure test databases, implement API testing, optimize test isolation
|
||||
4. **E2E Testing Configuration** - Setup browser testing (Cypress, Playwright), configure test environments, implement page objects
|
||||
5. **Visual & Performance Testing** - Setup visual regression testing, configure performance benchmarks, implement accessibility testing
|
||||
6. **CI/CD Integration** - Configure automated test execution, setup parallel testing, implement quality gates, optimize pipeline performance
|
||||
|
||||
**Advanced Features**: Contract testing, chaos engineering, load testing, security testing, cross-browser testing, mobile testing.
|
||||
|
||||
**Infrastructure Quality**: Test reliability, execution performance, maintainability, scalability, cost optimization.
|
||||
|
||||
**Output**: Complete testing infrastructure with configured frameworks, CI integration, quality metrics, and maintenance workflows.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [testing-type] | --capacity | --stress | --spike | --endurance | --volume
|
||||
description: Configure comprehensive load testing with performance metrics and bottleneck identification
|
||||
---
|
||||
|
||||
# Setup Load Testing
|
||||
|
||||
Configure comprehensive load testing with performance analysis and bottleneck identification: **$ARGUMENTS**
|
||||
|
||||
## Current Performance Context
|
||||
|
||||
- Application type: !`find . -name "server.js" -o -name "app.py" -o -name "main.go" | head -1 && echo "Server application" || echo "Detect app type"`
|
||||
- API endpoints: !`grep -r "app\\.get\\|app\\.post\\|@RequestMapping" . 2>/dev/null | wc -l` detected endpoints
|
||||
- Database: !`find . -name "*.sql" -o -name "database.js" | head -1 && echo "Database detected" || echo "No database files"`
|
||||
- Current monitoring: !`find . -name "prometheus.yml" -o -name "newrelic.js" | head -1 || echo "No monitoring detected"`
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive load testing with performance optimization and bottleneck analysis:
|
||||
|
||||
**Testing Type**: Use $ARGUMENTS to focus on capacity planning, stress testing, spike testing, endurance testing, or volume testing
|
||||
|
||||
**Load Testing Framework**:
|
||||
|
||||
1. **Strategy & Requirements** - Analyze application architecture, define testing objectives, determine scenarios, identify performance metrics
|
||||
2. **Tool Selection & Setup** - Choose appropriate tools (k6, Artillery, JMeter, Gatling), install dependencies, configure environments
|
||||
3. **Test Scenario Design** - Create realistic user scenarios, implement API test scripts, configure data generation, design load patterns
|
||||
4. **Performance Metrics** - Configure response time monitoring, throughput measurement, error rate tracking, resource utilization monitoring
|
||||
5. **Infrastructure Setup** - Configure test environments, setup monitoring dashboards, implement result collection, optimize test execution
|
||||
6. **Analysis & Optimization** - Identify performance bottlenecks, analyze resource constraints, recommend optimizations, track improvements
|
||||
|
||||
**Advanced Features**: Distributed load generation, real-time monitoring, automated performance regression detection, CI/CD integration, chaos engineering.
|
||||
|
||||
**Quality Assurance**: Test reliability, result accuracy, environment consistency, monitoring completeness.
|
||||
|
||||
**Output**: Complete load testing setup with configured scenarios, performance monitoring, bottleneck analysis, and optimization recommendations.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [testing-scope] | --components | --pages | --responsive | --cross-browser | --accessibility
|
||||
description: Setup comprehensive visual regression testing with cross-browser and responsive testing
|
||||
---
|
||||
|
||||
# Setup Visual Testing
|
||||
|
||||
Setup comprehensive visual regression testing with responsive and accessibility validation: **$ARGUMENTS**
|
||||
|
||||
## Current Visual Testing Context
|
||||
|
||||
- Frontend framework: !`grep -l "react\\|vue\\|angular" package.json 2>/dev/null || echo "Detect framework"`
|
||||
- UI components: !`find . -name "components" -o -name "src" | head -1 && echo "Component structure detected" || echo "Analyze structure"`
|
||||
- Existing testing: !`find . -name "cypress" -o -name "playwright" -o -name "storybook" | head -1 || echo "No visual testing"`
|
||||
- CI system: !`find . -name ".github" -o -name ".gitlab-ci.yml" | head -1 || echo "No CI detected"`
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive visual testing with regression detection and accessibility validation:
|
||||
|
||||
**Testing Scope**: Use $ARGUMENTS to focus on component testing, page testing, responsive testing, cross-browser testing, or accessibility testing
|
||||
|
||||
**Visual Testing Framework**:
|
||||
|
||||
1. **Tool Selection & Setup** - Choose visual testing tools (Percy, Chromatic, BackstopJS, Playwright), configure integration, setup environments
|
||||
2. **Baseline Creation** - Capture visual baselines, organize screenshot structure, implement version control, optimize image management
|
||||
3. **Test Scenario Design** - Create component tests, design page workflows, implement responsive breakpoints, configure browser matrix
|
||||
4. **Integration Setup** - Configure CI/CD integration, setup automated execution, implement review workflows, optimize performance
|
||||
5. **Regression Detection** - Configure diff algorithms, setup threshold management, implement approval workflows, optimize accuracy
|
||||
6. **Advanced Testing** - Setup accessibility testing, configure cross-browser validation, implement responsive testing, design performance monitoring
|
||||
|
||||
**Advanced Features**: Automated visual testing, intelligent diff analysis, accessibility compliance checking, responsive design validation, performance visual metrics.
|
||||
|
||||
**Quality Assurance**: Test reliability, false positive reduction, maintainability optimization, execution performance.
|
||||
|
||||
**Output**: Complete visual testing setup with baseline management, regression detection, CI integration, and comprehensive validation workflows.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [orchestration-type] | --parallel | --sequential | --conditional | --pipeline-optimization
|
||||
description: Orchestrate comprehensive test automation with intelligent execution and optimization
|
||||
---
|
||||
|
||||
# Test Automation Orchestrator
|
||||
|
||||
Orchestrate intelligent test automation with execution optimization and resource management: **$ARGUMENTS**
|
||||
|
||||
## Current Orchestration Context
|
||||
|
||||
- Test suites: !`find . -name "*.test.*" -o -name "*.spec.*" | wc -l` test files across project
|
||||
- Test frameworks: !`find . -name "jest.config.*" -o -name "cypress.config.*" -o -name "playwright.config.*" | wc -l` configured frameworks
|
||||
- CI system: !`find . -name ".github" -o -name ".gitlab-ci.yml" | head -1 || echo "No CI detected"`
|
||||
- Resource usage: Analysis of current test execution patterns and performance
|
||||
|
||||
## Task
|
||||
|
||||
Implement intelligent test orchestration with execution optimization and resource management:
|
||||
|
||||
**Orchestration Type**: Use $ARGUMENTS to focus on parallel execution, sequential execution, conditional testing, or pipeline optimization
|
||||
|
||||
**Test Orchestration Framework**:
|
||||
|
||||
1. **Test Discovery & Classification** - Analyze test suites, classify test types, assess execution requirements, optimize categorization
|
||||
2. **Execution Strategy Design** - Design parallel execution strategies, implement intelligent batching, optimize resource allocation, configure conditional execution
|
||||
3. **Dependency Management** - Analyze test dependencies, implement execution ordering, configure prerequisite validation, optimize dependency resolution
|
||||
4. **Resource Optimization** - Configure parallel execution, implement resource pooling, optimize memory usage, design scalable execution
|
||||
5. **Pipeline Integration** - Design CI/CD integration, implement stage orchestration, configure failure handling, optimize feedback loops
|
||||
6. **Monitoring & Analytics** - Implement execution monitoring, configure performance tracking, design failure analysis, optimize reporting
|
||||
|
||||
**Advanced Features**: AI-driven test selection, predictive execution optimization, dynamic resource allocation, intelligent failure recovery, cost optimization.
|
||||
|
||||
**Quality Assurance**: Execution reliability, performance consistency, resource efficiency, maintainability optimization.
|
||||
|
||||
**Output**: Complete test orchestration system with optimized execution, intelligent resource management, comprehensive monitoring, and performance analytics.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [automation-type] | --changelog | --workflow-demo | --ci-integration | --validation
|
||||
description: Automate changelog testing workflow with CI integration and validation
|
||||
---
|
||||
|
||||
# Test Changelog Automation
|
||||
|
||||
Automate changelog testing workflow with comprehensive CI integration: **$ARGUMENTS**
|
||||
|
||||
## Current Automation Context
|
||||
|
||||
- Changelog files: !`find . -name "CHANGELOG*" -o -name "changelog*" | head -1 || echo "No changelog detected"`
|
||||
- CI system: !`find . -name ".github" -o -name ".gitlab-ci.yml" -o -name "Jenkinsfile" | head -1 || echo "No CI detected"`
|
||||
- Version control: !`git status >/dev/null 2>&1 && echo "Git repository" || echo "No git repository"`
|
||||
- Release process: Analysis of existing release automation and versioning
|
||||
|
||||
## Task
|
||||
|
||||
Implement comprehensive changelog automation with testing and validation workflows:
|
||||
|
||||
**Automation Type**: Use $ARGUMENTS to focus on changelog automation, workflow demonstration, CI integration, or validation testing
|
||||
|
||||
**Changelog Automation Framework**:
|
||||
|
||||
1. **Automation Setup** - Configure changelog generation, setup version control integration, implement automated updates, design validation rules
|
||||
2. **Workflow Integration** - Design CI/CD integration, configure automated triggers, implement validation checks, optimize execution performance
|
||||
3. **Testing Strategy** - Create changelog validation tests, implement format verification, design content validation, setup regression testing
|
||||
4. **Quality Assurance** - Configure automated formatting, implement consistency checks, setup content validation, optimize maintenance workflows
|
||||
5. **Validation Framework** - Design automated validation rules, implement compliance checking, configure error reporting, optimize feedback loops
|
||||
6. **CI Integration** - Setup automated execution, configure deployment triggers, implement notification systems, optimize pipeline performance
|
||||
|
||||
**Advanced Features**: Automated release note generation, semantic versioning integration, automated documentation updates, compliance validation.
|
||||
|
||||
**Quality Metrics**: Changelog accuracy, automation reliability, validation effectiveness, maintenance efficiency.
|
||||
|
||||
**Output**: Complete changelog automation with testing workflows, CI integration, validation rules, and maintenance procedures.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [coverage-type] | --line | --branch | --function | --statement | --report
|
||||
description: Analyze and improve test coverage with comprehensive reporting and gap identification
|
||||
---
|
||||
|
||||
# Test Coverage
|
||||
|
||||
Analyze and improve test coverage with detailed reporting and gap analysis: **$ARGUMENTS**
|
||||
|
||||
## Current Coverage Context
|
||||
|
||||
- Test framework: !`find . -name "jest.config.*" -o -name ".nycrc*" -o -name "coverage.xml" | head -1 || echo "Detect framework"`
|
||||
- Coverage tools: !`npm ls nyc jest @jest/core 2>/dev/null | grep -E "nyc|jest" | head -2 || echo "No JS coverage tools"`
|
||||
- Existing coverage: !`find . -name "coverage" -type d | head -1 && echo "Coverage data exists" || echo "No coverage data"`
|
||||
- Test files: !`find . -name "*.test.*" -o -name "*.spec.*" | wc -l` test files
|
||||
|
||||
## Task
|
||||
|
||||
Execute comprehensive coverage analysis with improvement recommendations and reporting:
|
||||
|
||||
**Coverage Type**: Use $ARGUMENTS to focus on line coverage, branch coverage, function coverage, statement coverage, or comprehensive reporting
|
||||
|
||||
**Coverage Analysis Framework**:
|
||||
|
||||
1. **Coverage Tool Setup** - Configure appropriate tools (Jest, NYC, Istanbul, Coverage.py, JaCoCo), setup collection settings, optimize performance, enable reporting
|
||||
2. **Coverage Measurement** - Generate line coverage, branch coverage, function coverage, statement coverage reports, identify uncovered code paths
|
||||
3. **Gap Analysis** - Identify critical uncovered paths, analyze coverage quality, assess business logic coverage, evaluate edge case handling
|
||||
4. **Threshold Management** - Configure coverage thresholds, implement quality gates, setup trend monitoring, enforce minimum standards
|
||||
5. **Reporting & Visualization** - Generate detailed reports, create coverage dashboards, implement trend analysis, setup automated notifications
|
||||
6. **Improvement Planning** - Prioritize coverage gaps, recommend test additions, identify refactoring opportunities, plan coverage enhancement
|
||||
|
||||
**Advanced Features**: Differential coverage analysis, coverage trend monitoring, integration with code review, automated coverage alerts, performance impact assessment.
|
||||
|
||||
**Quality Insights**: Coverage quality assessment, test effectiveness analysis, maintainability correlation, risk area identification.
|
||||
|
||||
**Output**: Comprehensive coverage analysis with detailed reports, gap identification, improvement recommendations, and quality metrics tracking.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [analysis-type] | --coverage-quality | --test-effectiveness | --maintainability | --performance-analysis
|
||||
description: Analyze test suite quality with comprehensive metrics and improvement recommendations
|
||||
---
|
||||
|
||||
# Test Quality Analyzer
|
||||
|
||||
Analyze test suite quality with comprehensive metrics and actionable improvement insights: **$ARGUMENTS**
|
||||
|
||||
## Current Quality Context
|
||||
|
||||
- Test coverage: !`find . -name "coverage" -type d | head -1 && echo "Coverage data available" || echo "No coverage data"`
|
||||
- Test files: !`find . -name "*.test.*" -o -name "*.spec.*" | wc -l` test files
|
||||
- Test complexity: Analysis of test suite maintainability and effectiveness patterns
|
||||
- Performance metrics: Current test execution times and resource utilization
|
||||
|
||||
## Task
|
||||
|
||||
Execute comprehensive test quality analysis with improvement recommendations and optimization strategies:
|
||||
|
||||
**Analysis Type**: Use $ARGUMENTS to focus on coverage quality, test effectiveness, maintainability analysis, or performance analysis
|
||||
|
||||
**Test Quality Analysis Framework**:
|
||||
|
||||
1. **Coverage Quality Assessment** - Analyze coverage depth, evaluate coverage quality, assess edge case handling, identify coverage gaps
|
||||
2. **Test Effectiveness Evaluation** - Measure defect detection capability, analyze test reliability, assess assertion quality, evaluate test value
|
||||
3. **Maintainability Analysis** - Evaluate test code quality, analyze test organization, assess refactoring needs, optimize test structure
|
||||
4. **Performance Assessment** - Analyze execution performance, identify bottlenecks, optimize test speed, reduce resource consumption
|
||||
5. **Anti-Pattern Detection** - Identify testing anti-patterns, detect flaky tests, analyze test smells, recommend corrections
|
||||
6. **Quality Metrics Tracking** - Implement quality scoring, track improvement trends, configure quality gates, optimize quality processes
|
||||
|
||||
**Advanced Features**: AI-powered quality assessment, predictive quality modeling, automated improvement suggestions, quality trend analysis, benchmark comparison.
|
||||
|
||||
**Quality Insights**: Test ROI analysis, quality correlation analysis, maintenance cost assessment, effectiveness benchmarking.
|
||||
|
||||
**Output**: Comprehensive quality analysis with detailed metrics, improvement recommendations, optimization strategies, and quality tracking framework.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [target-code] | [test-type] | --rust | --inline | --refactoring-suggestions
|
||||
description: Create comprehensive integration testing plan with inline tests and refactoring recommendations
|
||||
---
|
||||
|
||||
# Testing Plan Integration
|
||||
|
||||
Create integration testing plan with inline test strategy and refactoring suggestions: **$ARGUMENTS**
|
||||
|
||||
## Current Testing Context
|
||||
|
||||
- Project type: !`[ -f Cargo.toml ] && echo "Rust project" || [ -f package.json ] && echo "Node.js project" || echo "Multi-language project"`
|
||||
- Test framework: !`find . -name "*.test.*" -o -name "*.spec.*" | head -3` existing tests
|
||||
- Target code: Analysis of $ARGUMENTS for testability assessment
|
||||
- Integration complexity: Assessment of component interactions and dependencies
|
||||
|
||||
## Task
|
||||
|
||||
Execute comprehensive integration testing plan with testability analysis:
|
||||
|
||||
**Planning Focus**: Use $ARGUMENTS to specify target code, test type requirements, Rust inline testing, or refactoring suggestions
|
||||
|
||||
**Integration Testing Framework**:
|
||||
|
||||
1. **Code Testability Analysis** - Analyze target code structure, identify testing challenges, assess coupling levels, evaluate dependency injection
|
||||
2. **Test Strategy Design** - Design integration test approach, plan inline vs separate test files, identify test boundaries, optimize test isolation
|
||||
3. **Refactoring Assessment** - Identify testability improvements, suggest dependency injection, recommend interface abstractions, optimize component boundaries
|
||||
4. **Test Case Planning** - Design integration scenarios, identify critical paths, plan data flow testing, assess error handling coverage
|
||||
5. **Mock Strategy** - Plan external dependency mocking, design test doubles, identify integration boundaries, optimize test performance
|
||||
6. **Execution Planning** - Design test execution order, plan test data management, optimize test environment setup, ensure test isolation
|
||||
|
||||
**Advanced Features**: Rust-style inline testing, property-based integration tests, contract testing, service virtualization, chaos engineering integration.
|
||||
|
||||
**Quality Assurance**: Test maintainability, execution performance, coverage optimization, feedback loop efficiency.
|
||||
|
||||
**Output**: Comprehensive integration test plan with test case specifications, refactoring recommendations, implementation strategy, and quality metrics.
|
||||
@@ -0,0 +1,116 @@
|
||||
---
|
||||
allowed-tools: Bash, Read
|
||||
description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
|
||||
---
|
||||
|
||||
# Web Application Testing
|
||||
|
||||
This skill enables comprehensive testing and debugging of local web applications using Playwright automation.
|
||||
|
||||
## When to Use This Skill
|
||||
|
||||
Use this skill when you need to:
|
||||
- Test frontend functionality in a real browser
|
||||
- Verify UI behavior and interactions
|
||||
- Debug web application issues
|
||||
- Capture screenshots for documentation or debugging
|
||||
- Inspect browser console logs
|
||||
- Validate form submissions and user flows
|
||||
- Check responsive design across viewports
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Node.js installed on the system
|
||||
- A locally running web application (or accessible URL)
|
||||
- Playwright will be installed automatically if not present
|
||||
|
||||
## Core Capabilities
|
||||
|
||||
### 1. Browser Automation
|
||||
- Navigate to URLs
|
||||
- Click buttons and links
|
||||
- Fill form fields
|
||||
- Select dropdowns
|
||||
- Handle dialogs and alerts
|
||||
|
||||
### 2. Verification
|
||||
- Assert element presence
|
||||
- Verify text content
|
||||
- Check element visibility
|
||||
- Validate URLs
|
||||
- Test responsive behavior
|
||||
|
||||
### 3. Debugging
|
||||
- Capture screenshots
|
||||
- View console logs
|
||||
- Inspect network requests
|
||||
- Debug failed tests
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Example 1: Basic Navigation Test
|
||||
```javascript
|
||||
// Navigate to a page and verify title
|
||||
await page.goto('http://localhost:3000');
|
||||
const title = await page.title();
|
||||
console.log('Page title:', title);
|
||||
```
|
||||
|
||||
### Example 2: Form Interaction
|
||||
```javascript
|
||||
// Fill out and submit a form
|
||||
await page.fill('#username', 'testuser');
|
||||
await page.fill('#password', 'password123');
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForURL('**/dashboard');
|
||||
```
|
||||
|
||||
### Example 3: Screenshot Capture
|
||||
```javascript
|
||||
// Capture a screenshot for debugging
|
||||
await page.screenshot({ path: 'debug.png', fullPage: true });
|
||||
```
|
||||
|
||||
## Guidelines
|
||||
|
||||
1. **Always verify the app is running** - Check that the local server is accessible before running tests
|
||||
2. **Use explicit waits** - Wait for elements or navigation to complete before interacting
|
||||
3. **Capture screenshots on failure** - Take screenshots to help debug issues
|
||||
4. **Clean up resources** - Always close the browser when done
|
||||
5. **Handle timeouts gracefully** - Set reasonable timeouts for slow operations
|
||||
6. **Test incrementally** - Start with simple interactions before complex flows
|
||||
7. **Use selectors wisely** - Prefer data-testid or role-based selectors over CSS classes
|
||||
|
||||
## Common Patterns
|
||||
|
||||
### Pattern: Wait for Element
|
||||
```javascript
|
||||
await page.waitForSelector('#element-id', { state: 'visible' });
|
||||
```
|
||||
|
||||
### Pattern: Check if Element Exists
|
||||
```javascript
|
||||
const exists = await page.locator('#element-id').count() > 0;
|
||||
```
|
||||
|
||||
### Pattern: Get Console Logs
|
||||
```javascript
|
||||
page.on('console', msg => console.log('Browser log:', msg.text()));
|
||||
```
|
||||
|
||||
### Pattern: Handle Errors
|
||||
```javascript
|
||||
try {
|
||||
await page.click('#button');
|
||||
} catch (error) {
|
||||
await page.screenshot({ path: 'error.png' });
|
||||
throw error;
|
||||
}
|
||||
```
|
||||
|
||||
## Limitations
|
||||
|
||||
- Requires Node.js environment
|
||||
- Cannot test native mobile apps (use React Native Testing Library instead)
|
||||
- May have issues with complex authentication flows
|
||||
- Some modern frameworks may require specific configuration
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
argument-hint: [target-file] | [test-type] | --unit | --integration | --e2e | --component
|
||||
description: Write comprehensive unit and integration tests with proper mocking and coverage
|
||||
---
|
||||
|
||||
# Write Tests
|
||||
|
||||
Write comprehensive unit and integration tests with framework-specific best practices: **$ARGUMENTS**
|
||||
|
||||
## Current Testing Context
|
||||
|
||||
- Test framework: !`find . -name "jest.config.*" -o -name "*.test.*" | head -1 && echo "Jest/Vitest detected" || echo "Detect framework"`
|
||||
- Target file: Analysis of $ARGUMENTS for test requirements and complexity
|
||||
- Project patterns: !`find . -name "*.test.*" -o -name "*.spec.*" | head -3` existing test patterns
|
||||
- Coverage setup: !`grep -l "coverage" package.json jest.config.* 2>/dev/null | head -1 || echo "Setup needed"`
|
||||
|
||||
## Task
|
||||
|
||||
Execute comprehensive test writing with framework-specific optimizations and best practices:
|
||||
|
||||
**Test Focus**: Use $ARGUMENTS to specify target file, unit tests, integration tests, e2e tests, or component tests
|
||||
|
||||
**Test Writing Framework**:
|
||||
|
||||
1. **Code Analysis** - Analyze target code structure, identify testable functions, assess dependency complexity, evaluate edge cases
|
||||
2. **Test Strategy Design** - Plan test organization, design test hierarchies, identify mock requirements, optimize test isolation
|
||||
3. **Framework Integration** - Setup framework-specific patterns, configure test utilities, implement proper assertions, optimize test performance
|
||||
4. **Mock Implementation** - Design dependency mocks, implement test doubles, create factory functions, setup async handling
|
||||
5. **Test Case Generation** - Write unit tests, integration tests, edge cases, error scenarios, performance tests, snapshot tests
|
||||
6. **Quality Assurance** - Ensure test maintainability, optimize execution speed, validate coverage, implement proper cleanup
|
||||
|
||||
**Advanced Features**: Property-based testing, contract testing, visual regression testing, accessibility testing, performance benchmarking.
|
||||
|
||||
**Framework Support**: Jest/Vitest, React Testing Library, Vue Test Utils, Angular TestBed, Cypress, Playwright integration.
|
||||
|
||||
**Output**: Comprehensive test suite with unit tests, integration tests, proper mocking, test utilities, and coverage optimization.
|
||||
Reference in New Issue
Block a user