Skip to main content
Version: 1.x

Interface: AiGeneratedTest

Defined in: src/ai/types.ts:427

Result of AgenticHandler.generateTest() — a fully generated Playwright test.

Remarks

steps contains natural-language descriptions of each step. code contains the generated TypeScript/Playwright code. metadata carries provenance for debugging and auditing.

Intent

Hold the output of an AI-generated Playwright test including code and provenance.

Capability

AI test generation, agentic workflow.

Example

const result: AiGeneratedTest = {
steps: ['Navigate to app', 'Fill form', 'Submit'],
code: "test('example', async ({ ui5 }) => { ... })",
metadata: {
model: 'gpt-4o',
tokens: { input: 1200, output: 340 },
duration: 1850,
capabilities: ['click-button', 'fill-input'],
},
};

Properties

code

readonly code: string

Defined in: src/ai/types.ts:431

Generated TypeScript/Playwright test code.


metadata

readonly metadata: object

Defined in: src/ai/types.ts:433

Provenance and cost metadata for the generation.

capabilities

readonly capabilities: string[]

Capability IDs referenced during generation.

duration

readonly duration: number

Duration in milliseconds for the LLM call.

model

readonly model: string

Model used for generation.

tokens

readonly tokens: object

Token usage breakdown.

tokens.input

readonly input: number

tokens.output

readonly output: number


steps

readonly steps: string[]

Defined in: src/ai/types.ts:429

Natural-language description of each test step in order.