Test Runner

Interactive UI for running individual AI agent test cases with progress tracking and result display

SaaSAI Agents

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.

greetingbasicsmoke-test

Test Input

User Message:

Hello!

Expected Behavior:

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.

greetingbasicsmoke-test

Test Input

User Message:

Hello!

Expected Behavior:

Agent should greet the user warmly and offer assistance.

running
1.5s

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.

greetingbasicsmoke-test

Test Input

User Message:

Hello!

Expected Behavior:

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

NameTypeDefaultRequiredDescription
testCaseTestCase—YesThe test case to run
currentRunTestRun—NoCurrently active test run (if any)
onRun(testCase: TestCase) => void | Promise<void>—YesCallback when run button is clicked
onCancel(() => void)—NoCallback when cancel is clicked (for running tests)
isRunningbooleanfalseNoWhether a test is currently running
progressnumber0NoProgress percentage (0-100) for running tests
currentStepstring—NoCurrent execution step
elapsedTimeMsnumber—NoElapsed time in milliseconds
classNamestring—NoAdditional class names