Skip to content

AI for Test Case Configuration

Stage 1 of the load testing workflow is where the AI assistant earns its keep. After you record a test case, the AI helps you configure it to replay successfully by diagnosing correlation issues, explaining ASM decisions, and debugging authentication failures. This is the stage where most people get stuck, and where context-specific answers matter most.

This is a reference guide to AI capabilities for configuration. Detailed prompts and examples are embedded in each Configuration section topic where you will actually use them.


What AI Helps With in Configuration

Platform Detection

AI can: - Identify your application stack (React, Angular, .NET, Salesforce, etc.) - Recognize authentication patterns (OAuth, SAML, form-based) - Detect common frameworks and their correlation requirements - Suggest platform-specific configuration approaches

Example prompts: - "What platform is this application built on?" - "Does this application use OAuth authentication?" - "Is this a React SPA or traditional server-rendered app?"

Where AI guidance appears: - Throughout Understanding Web Pages & Application State - In platform-specific guides (Salesforce, REST APIs)

Application State Management (ASM)

AI can: - Explain why ASM configured specific fields as dynamic - Identify fields ASM might have missed - Suggest when to override ASM decisions - Diagnose ASM configuration issues

Example prompts: - "Why did ASM configure these 15 fields as dynamic?" - "Should I override this field to use a dataset instead?" - "ASM didn't detect the session token. Where should I look?" - "Explain what ASM found in this test case"

Where AI guidance appears: - Application State Management (ASM) Overview - Basic ASM / Dynamic Fields - Advanced Field Assignments

Correlation & Dynamic Values

AI can: - Diagnose missing correlation (401, 403 errors) - Identify which values need extraction - Suggest extractor types (boundary, regex, JSON path) - Explain correlation failures

Example prompts: - "Why isn't the session cookie correlating?" - "How do I extract the CSRF token from this response?" - "This dynamic URL parameter isn't being captured. What's wrong?" - "Explain the difference between boundary and regex extractors"

Where AI guidance appears: - Extractors & Boundary Extraction - Dynamic Named Fields - Throughout Advanced Field Assignments

Authentication Configuration

AI can: - Diagnose authentication failures (401, 403 errors) - Identify authentication type (Basic, OAuth, Bearer tokens, SAML) - Suggest authentication configuration steps - Debug token extraction and injection

Example prompts: - "My test case uses OAuth. How do I configure it?" - "The Bearer token isn't being extracted from the login response. Why?" - "How do I configure Basic authentication with multiple users?" - "Explain why I'm getting 401 errors after login"

Where AI guidance appears: - Authentication Overview - Basic/Form Authentication - OAuth & Bearer Tokens - Client Certificates

Datasets & Data-Driven Testing

AI can: - Suggest which fields should use datasets - Explain dataset column mapping - Help design realistic test data - Debug dataset configuration issues

Example prompts: - "Which fields should I configure with datasets for multi-user testing?" - "How do I map this dataset column to the username field?" - "Why isn't the dataset data being used during replay?" - "Should I use unique values or allow repeats in this dataset?"

Where AI guidance appears: - Datasets & Data-Driven Testing - Modifying Test Case Content

Replay Debugging

AI can: - Diagnose why replays fail - Analyze error messages and response codes - Suggest specific fixes for correlation issues - Guide you through systematic debugging

Example prompts: - "My replay fails with 403 Forbidden on the checkout page. Why?" - "The server returns 'Invalid CSRF token'. How do I fix this?" - "Replay succeeds sometimes but fails other times. What's wrong?" - "Walk me through debugging this 404 error"

Where AI guidance appears: - Debugging Failed Replays - Replay Troubleshooting - Throughout Understanding Replay Results


Common Configuration Scenarios

Scenario 1: First Replay After Recording

Your situation: Just recorded a test case, ran ASM, attempting first replay.

Ask the AI:

I just recorded and configured my test case with ASM. What should
I check before running the first replay?

AI will help you: - Verify ASM configuration is complete - Check for common issues (missing session cookies, CSRF tokens) - Suggest pre-replay validation steps - Set expectations for first replay results

Next: Running a Replay

Scenario 2: 401/403 Authentication Errors

Your situation: Replay fails with 401 Unauthorized or 403 Forbidden errors.

Ask the AI:

My replay is failing with 401 errors on [page name]. The login
succeeded, but subsequent pages return Unauthorized. What's the
likely cause?

AI will help you: - Identify which authentication value is missing - Check if session cookies are extracted and injected - Verify Bearer tokens or auth headers are configured - Suggest specific fixes based on your test case

Next: Debugging Failed Replays

Scenario 3: CSRF Token Validation Failures

Your situation: Form submission fails with "Invalid CSRF token" or 422 status.

Ask the AI:

I'm getting "CSRF token validation failed" when submitting the
checkout form. How do I configure the CSRF token correctly?

AI will help you: - Locate the CSRF token in the HTML response - Create an extractor to capture the token - Verify the token is injected into the form submission - Check for hidden fields or header-based CSRF tokens

Next: Advanced Field Assignments

Scenario 4: Dynamic URL Parameters

Your situation: URLs contain UUIDs or session-specific IDs that change between replays.

Ask the AI:

My URLs contain UUIDs like /checkout/session/abc-123-def/payment
that change each time. How do I handle dynamic URL parameters?

AI will help you: - Identify where the dynamic ID first appears in responses - Create an extractor to capture the ID - Configure URL parameterization - Verify the dynamic URL is constructed correctly during replay

Next: Dynamic Named Fields

Scenario 5: Multi-User Testing

Your situation: Want to test with different usernames/passwords for each virtual user.

Ask the AI:

I want to run a load test with 100 different users. How do I
configure multiple usernames and passwords?

AI will help you: - Explain dataset configuration for user credentials - Suggest dataset file format (CSV structure) - Show how to map dataset columns to username/password fields - Verify each virtual user gets unique credentials

Next: Datasets & Data-Driven Testing

Scenario 6: REST API with JSON Responses

Your situation: Testing a REST API that returns JSON data with dynamic IDs.

Ask the AI:

I'm testing a REST API. The JSON response contains a "sessionId"
that needs to be extracted and used in subsequent API calls.
How do I configure this?

AI will help you: - Create JSON path extractors to pull values from responses - Configure headers for Bearer tokens or API keys - Verify JSON data is being injected correctly - Debug Content-Type and serialization issues

Next: REST/API Testing


When to Use AI vs Manual Documentation

Use AI when:

You're stuck on a specific error - "Why am I getting this 403 error?"

You need to understand ASM decisions - "Why was this field configured as dynamic?"

You want configuration recommendations - "Should I use a dataset or custom value here?"

You're debugging correlation issues - "Why isn't this token being extracted?"

You need context-specific help - AI sees YOUR test case and YOUR errors

Use the Manual when:

📖 Learning concepts from scratch - What is correlation? How does ASM work?

📖 Step-by-step tutorials - How to configure OAuth authentication

📖 Reference information - What field datasource types are available?

📖 Planning your approach - Understanding authentication strategies before configuring

📖 Comprehensive background - Deep dive into web application state management


Effective Configuration Prompts

✅ Good Configuration Prompts

Specific and contextual: - "The 'authenticity_token' field is configured as dynamic by ASM. Why was this detected as a CSRF token?" - "I'm testing a Salesforce application. What authentication configuration do I need?" - "ASM configured 20 fields, but replay still fails. Which fields are most likely causing the 401 errors?"

Include relevant details: - "My test case logs in, then navigates to 3 pages. Replay succeeds on login but fails with 403 on the second page. What should I check?" - "The Bearer token is in the Authorization header of the login response. How do I extract it and use it in subsequent API calls?"

❌ Avoid Vague Prompts

Too general: - "Help me configure my test case" (What specifically needs configuration?) - "ASM doesn't work" (What didn't work? What errors do you see?) - "My replay fails" (With what error? On which page?)

Missing context: - "How do I fix this?" (Fix what, exactly?) - "Should I use ASM?" (For what situation? What are you trying to accomplish?)


AI Configuration Workflow

Here's how AI fits into the typical configuration workflow:

1. Record Test Case

Manual step

2. Run ASM

Manual step

3. Ask AI: "What did ASM configure and why?"

AI explains ASM decisions

4. Run First Replay

Manual step

5. If Replay Fails: Ask AI "Why did replay fail with [errors]?"

AI diagnoses correlation issues

6. Apply AI Suggestions

Manual step: Create extractors, configure fields

7. Replay Again

Manual step

8. If Still Failing: Ask AI "I tried [solution] but still see [error]"

AI suggests alternative approaches

9. Iterate Until Replay Succeeds

Repeat steps 6-8

Key point: The AI guides you through configuration, but you make all changes. This keeps you in control and, over time, teaches you the patterns so you stop needing the AI for routine issues.


Next Steps

Or: Return to the Configuring section and look for AI guidance embedded in each topic:


Related Topics: - AI Assistant Overview - Getting Started with AI - AI for Monitoring - AI for Analysis - Limitations & Safety