Regression Testing Prompts

This section provides prompts designed to help you create effective regression test suites using AI. These prompts ensure thorough coverage of existing functionality while testing new changes.

Basic Regression Test Generation

Prompt Template

Generate a regression test suite for:
[Feature/System]: [Brief description]

Changes Made:
1. [Change 1]
2. [Change 2]
...

Existing Functionality:
- [Functionality 1]
- [Functionality 2]
...

Please include:
- Test Cases
- Test Scenarios
- Test Data Requirements
- Dependencies
- Priority Levels
- Test Environment Setup

Example Usage

Generate a regression test suite for:
User Profile Management: Adding new profile picture upload feature

Changes Made:
1. Added profile picture upload functionality
2. Modified profile page layout
3. Updated user data storage

Existing Functionality:
- User registration
- Profile information editing
- Password management
- Email verification
- Account deletion

Please include:
- Test Cases
- Test Scenarios
- Test Data Requirements
- Dependencies
- Priority Levels
- Test Environment Setup

Advanced Regression Testing

Automated Regression Testing

Generate automated regression test scenarios for:
[Feature/System]: [Description]

Focus Areas:
1. Core Functionality
2. Integration Points
3. Data Flow
4. Error Handling
5. Performance Impact

Include:
- Test Scripts
- Test Data
- Dependencies
- Environment Setup
- Execution Plan

Visual Regression Testing

Generate visual regression test cases for:
[UI Component/Page]: [Description]

Coverage Areas:
1. Layout Changes
2. Responsive Design
3. Visual Elements
4. Component States
5. Cross-browser Compatibility

Include:
- Screenshot Comparisons
- Element Positioning
- Style Changes
- Responsive Breakpoints
- Browser Variations

Best Practices

When using these prompts:
  1. Be Comprehensive
    • Cover all affected areas
    • Include related functionality
    • Consider integration points
  2. Prioritize Tests
    • Focus on critical paths
    • Consider business impact
    • Include high-risk areas
  3. Maintain Efficiency
    • Avoid redundant tests
    • Optimize test execution
    • Use test automation
  4. Document Changes
    • Track modifications
    • Update test cases
    • Version control

Tips for Better Results

  1. Start with Impact Analysis
    • Identify affected areas
    • Assess risk levels
    • Determine test scope
  2. Use Test Automation
    • Create automated scripts
    • Set up CI/CD integration
    • Monitor execution results
  3. Maintain Test Data
    • Keep data current
    • Version control data
    • Document data requirements
  4. Review and Update
    • Regular test reviews
    • Update test cases
    • Remove obsolete tests

Common Pitfalls to Avoid

  1. Incomplete Coverage
    • ❌ “Test the changes”
    • ✅ “Test all user profile features, including registration, editing, and deletion”
  2. Missing Dependencies
    • ❌ “Run the tests”
    • ✅ “Run tests with required database setup, API endpoints, and user permissions”
  3. Poor Test Organization
    • ❌ “Random test execution”
    • ✅ “Execute tests in order: core functionality, integration points, edge cases”
  4. Inadequate Documentation
    • ❌ “Update tests”
    • ✅ “Update test cases with new requirements, test data, and expected results”

Example Output Structure

Regression Test Suite: User Profile Management
Version: 2.0
Date: [Current Date]

1. Test Scope
   - Affected Features
   - Integration Points
   - Dependencies

2. Test Cases
   - Core Functionality
   - Integration Tests
   - Edge Cases
   - Performance Tests

3. Test Data
   - Required Data
   - Test Scenarios
   - Data Setup

4. Test Environment
   - Setup Requirements
   - Dependencies
   - Configuration

5. Execution Plan
   - Test Order
   - Priority Levels
   - Time Estimates

6. Success Criteria
   - Pass/Fail Criteria
   - Performance Metrics
   - Quality Gates