Test Runner
Interactive UI for running individual AI agent test cases with progress tracking and result display
Overview
TestRunner provides a control panel for executing individual agent test cases. It displays the test case details, input preview, evaluation criteria, and a run/cancel button. During execution it shows a progress bar with the current step, and once complete it displays the test output and status badge.
Usage
import { TestRunner } from "@leanicon/web-builder-library/saas";
<TestRunner
testCase={testCase}
currentRun={currentRun}
onRun={handleRun}
onCancel={handleCancel}
isRunning={isRunning}
progress={progress}
currentStep="Evaluating response..."
elapsedTimeMs={2500}
/>;Variants
Default (Ready to Run)
Basic Greeting Response
Verify the agent responds appropriately to a simple greeting.
Test Input
Hello!
Agent should greet the user warmly and offer assistance.
Evaluation Criteria
- 1.Response includes a greeting
- 2.Response offers to help
- 3.Tone is friendly and professional
Running
Basic Greeting Response
Verify the agent responds appropriately to a simple greeting.
Test Input
Hello!
Agent should greet the user warmly and offer assistance.
Executing agent response...
Evaluation Criteria
- 1.Response includes a greeting
- 2.Response offers to help
- 3.Tone is friendly and professional
Dark
Basic Greeting Response
Verify the agent responds appropriately to a simple greeting.
Test Input
Hello!
Agent should greet the user warmly and offer assistance.
Evaluation Criteria
- 1.Response includes a greeting
- 2.Response offers to help
- 3.Tone is friendly and professional
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
testCase | TestCase | — | Yes | The test case to run |
currentRun | TestRun | — | No | Currently active test run (if any) |
onRun | (testCase: TestCase) => void | Promise<void> | — | Yes | Callback when run button is clicked |
onCancel | (() => void) | — | No | Callback when cancel is clicked (for running tests) |
isRunning | boolean | false | No | Whether a test is currently running |
progress | number | 0 | No | Progress percentage (0-100) for running tests |
currentStep | string | — | No | Current execution step |
elapsedTimeMs | number | — | No | Elapsed time in milliseconds |
className | string | — | No | Additional class names |