← Back to Docs

Batch Code Generation

Generate executable code for multiple test cases simultaneously

Batch code generation allows you to create test code for dozens or hundreds of test cases at once, with intelligent resource management and progress tracking.

How It Works

1. Select Test Cases

Navigate to Scenario Testing or API Testing, choose which tests to generate code for:

Project → Test Cases → Select Multiple → Generate Code

Selection Options:

  • All test cases in project
  • Specific test cases
  • Tests without code

Smart Generation Logic

Batch generation intelligently handles different test case states:

✅ Will Generate Code:

  • Test cases with no plan or code (generates from scratch)
  • Test cases with partial code and no errors (continues generating remaining steps)

⏭️ Will Skip:

  • Test cases with complete code already generated
  • Test cases with execution errors in any step (requires manual fix first)

Example:

Test Case A: No plan → ✅ Generates plan and code
Test Case B: Plan exists, no code → ✅ Generates code for all steps
Test Case C: 3/5 steps have code, no errors → ✅ Generates code for remaining 2 steps
Test Case D: All steps have code → ⏭️ Skipped
Test Case E: Step 2 has execution error → ⏭️ Skipped (fix error first)

2. Start Batch

System begins generation:

  • Tests queued automatically
  • Parallel generation starts
  • Progress updates in real-time

3. Review Results

Comprehensive reporting:

  • Success/failure summary
  • Generated code per test
  • Error analysis

Key Features

Parallel Processing

  • Generate code for multiple tests simultaneously
  • Progress tracking for each test
  • Resource-aware scheduling

Automatic Error Handling

  • Retry logic for transient failures
  • AI Auto-Fix for code issues
  • Detailed error reporting

Use Cases

Initial Test Case Creation

Generate code for all test cases of an API at once:

API Version Update

Regenerate tests after API changes:

30 affected tests → Batch regenerate → Updated Test Case

Best Practices

  • Start with small batches (5-10 tests) to verify configuration
  • Enable AI Auto-Fix for automatic error correction
  • Review generated code before running tests
  • Use batch generation during off-peak hours for large suites

Next Steps


← Back to Documentation