What Are Code Simulations?
Code Simulations allow you to describe test scenarios in natural language and have AI simulate what would happen before you run actual tests. This “testing before testing” approach helps you:- Identify potential issues early
- Assess risk before execution
- Validate testing strategies
- Uncover edge cases through AI-driven analysis
Scenario Creation
Build structured scenarios with the following components:Title & Description
Title & Description
- Create named scenarios for specific testing situations.
- Provide a clear description of what you’re trying to validate or test.
Initial State
Initial State
- Define starting conditions for the test, including:
- Required setup or seed data
- User permissions and access levels
- System configurations needed before testing begins
Interventions
Interventions
- Outline step-by-step actions for the scenario, such as:
- User interactions or system events
- Optional hints for each step to guide execution
- Indicators for what to watch for or measure
Expected Outcome
Expected Outcome
- Define what success looks like:
- Specific behaviors or UI states
- Data changes or persistence results
- Final system state validation
Source Integration
Source Integration
- Automatically generate scenarios from:
- Existing tickets
- Historical issues and known regressions
- Relevant user reports tied to your codebase
Simulation and Analysis
Run scenarios through AI-powered simulation — no actual code execution required.AI-Powered Execution
AI-Powered Execution
- The AI processes each step in your scenario.
- Predictions are based on:
- Your codebase
- Historical failure patterns
- Known dependencies and system behavior
Status Tracking
Status Tracking
- Monitor simulations in real time.
- Scenarios progress through states:
- Pending → Running → Finished or Canceled
- Includes progress indicators and status logs.
State Analysis
State Analysis
- View intermediate states as the AI “walks through” each intervention.
- Understand the assumptions, data transitions, and expected results at every stage.
Risk Assessment
Risk Assessment
- The AI assigns a likelihood of success:
- Unlikely
- Uncertain
- Very Likely
- Ratings are based on historical outcomes and risk signals in your code.
Prediction vs Reality
Prediction vs Reality
- Compare the AI’s predicted results with your expected outcomes.
- Get explanations for any gaps to refine your assumptions.
- Surface potential edge cases or untested paths before you commit to actual testing.
Managing Scenarios
Inline Editing
Inline Editing
- Edit scenarios directly from the Player side panel or the branch review page
- Use the keyboard-driven step editor: Enter to add a new step, Backspace on an empty step to delete it
- Quick-add scenarios to playlists without leaving the current view
Outdated Scenario Detection
Outdated Scenario Detection
- When a scenario definition has changed since the last simulation run, a warning banner appears on the simulation results
- The warning shows which version was used and offers a one-click re-run on the latest version
- Playlist views mark individual scenarios as outdated when their version has drifted
Re-running Simulations
Re-running Simulations
- Single-scenario re-run — Re-run an individual simulation from the sim results viewer or playlist interface without re-running the entire playlist
- Branch re-run — Trigger simulation runs on-demand from the branch review page using the Run Simulations button. Staleness detection warns when scenarios have changed since the last run.
Use Cases
UI Testing
UI Testing
- Simulate user interactions and complex flows.
- Validate responsive design, navigation, and form submissions without running full UI tests.
Backend Testing
Backend Testing
- Model API calls and service interactions.
- Analyze data validation, error handling, and integration points.
Database Interactions
Database Interactions
- Predict data persistence, transaction handling, and load behavior.
- Evaluate integrity checks and potential performance bottlenecks before load testing.
Why It Matters
Code Simulations transform testing by providing intelligent pre-analysis, allowing teams to:- Refine test scenarios before committing time to execution
- Identify risks and weak points early
- Build more comprehensive and resilient test coverage
- Reduce wasted time on redundant or low-value test cases