UNPKG

html-reporter

Version:

Html-reporter and GUI for viewing and managing results of a tests run. Currently supports Testplane and Hermione.

61 lines (60 loc) 2.01 kB
/// <reference types="gemini-testing__sql.js" /> import type { Database } from '@gemini-testing/sql.js'; import { TestStatus } from './constants'; import type { Attachment, ImageInfoFull, TestError, TestStepCompressed } from './types'; import type { HtmlReporter } from './plugin-api'; import { ReporterTestResult } from './adapters/test-result'; import { DbTestResultTransformer } from './adapters/test-result/transformers/db'; interface QueryParams { select?: string; where?: string; orderBy?: string; orderDescending?: boolean; limit?: number; noCache?: boolean; } interface DeleteParams { where?: string; } export interface DbTestResult { description?: string | null; error?: TestError; history: TestStepCompressed[]; imagesInfo: ImageInfoFull[]; metaInfo: Record<string, unknown>; multipleTabs: boolean; name: string; screenshot: boolean; skipReason?: string; status: TestStatus; suiteName: string; suitePath: string[]; suiteUrl: string; timestamp: number; duration: number; attachments: Attachment[]; } interface SqliteClientOptions { htmlReporter: HtmlReporter; reportPath: string; reuse?: boolean; } export declare class SqliteClient { private readonly _db; private readonly _dbPath; private readonly _insertSuitesStatement; private _queryCache; private _transformer; static create<T extends SqliteClient>(this: { new (db: Database, dbPath: string, transformer: DbTestResultTransformer): T; }, options: SqliteClientOptions): Promise<T>; constructor(db: Database, dbPath: string, transformer: DbTestResultTransformer); getRawConnection(): Database; close(): void; query<T = unknown>(queryParams?: QueryParams, ...queryArgs: string[]): T | undefined; write(testResult: ReporterTestResult): void; delete(deleteParams?: DeleteParams, ...deleteArgs: string[]): void; private _createSentence; private _createValuesArray; } export {};