Interface: Test

June 6, 2026 ยท View on GitHub

CTRF


CTRF / Test

Interface: Test

Defined in: types.ts:105

Individual test result

Properties

id?

optional id?: string

Defined in: types.ts:107

Unique test identifier (UUID)


name

name: string

Defined in: types.ts:109

Test name


status

status: TestStatus

Defined in: types.ts:111

Test execution status


duration

duration: number

Defined in: types.ts:113

Test duration in milliseconds


start?

optional start?: number

Defined in: types.ts:115

Start timestamp (Unix epoch milliseconds)


stop?

optional stop?: number

Defined in: types.ts:117

Stop timestamp (Unix epoch milliseconds)


suite?

optional suite?: string[]

Defined in: types.ts:119

Test suite hierarchy


message?

optional message?: string

Defined in: types.ts:121

Error message (for failed tests)


trace?

optional trace?: string

Defined in: types.ts:123

Stack trace (for failed tests)


snippet?

optional snippet?: string

Defined in: types.ts:125

Code snippet where failure occurred


ai?

optional ai?: string

Defined in: types.ts:127

AI-generated analysis or suggestion


line?

optional line?: number

Defined in: types.ts:129

Line number where test is defined or failed


rawStatus?

optional rawStatus?: string

Defined in: types.ts:131

Original status from the test framework


tags?

optional tags?: string[]

Defined in: types.ts:133

Tags for categorization


type?

optional type?: string

Defined in: types.ts:135

Test type (e.g., 'unit', 'integration', 'e2e')


filePath?

optional filePath?: string

Defined in: types.ts:137

Path to the test file


retries?

optional retries?: number

Defined in: types.ts:139

Number of retry attempts


retryAttempts?

optional retryAttempts?: RetryAttempt[]

Defined in: types.ts:141

Details of each retry attempt


flaky?

optional flaky?: boolean

Defined in: types.ts:143

Whether the test is flaky


stdout?

optional stdout?: string[]

Defined in: types.ts:145

Standard output captured during test


stderr?

optional stderr?: string[]

Defined in: types.ts:147

Standard error captured during test


threadId?

optional threadId?: string

Defined in: types.ts:149

Thread/worker ID that ran this test


browser?

optional browser?: string

Defined in: types.ts:151

Browser name (for browser tests)


device?

optional device?: string

Defined in: types.ts:153

Device name (for device tests)


screenshot?

optional screenshot?: string

Defined in: types.ts:155

Base64 encoded screenshot


attachments?

optional attachments?: Attachment[]

Defined in: types.ts:157

File attachments


parameters?

optional parameters?: Record<string, unknown>

Defined in: types.ts:159

Test parameters (for parameterized tests)


steps?

optional steps?: Step[]

Defined in: types.ts:161

Test steps


insights?

optional insights?: TestInsights

Defined in: types.ts:163

Test-level insights


extra?

optional extra?: Record<string, unknown>

Defined in: types.ts:165

Custom metadata