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) • 1.92 kB
TypeScript
import Database from 'better-sqlite3';
import { TestStatus } from './constants';
import type { Attachment, ImageInfoFull, TestError, TestStepCompressed } from './types';
import { 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;
orderBy?: string;
orderDescending?: boolean;
limit?: number;
}
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 _queryCache;
private _transformer;
static create<T extends SqliteClient>(this: {
new (db: Database.Database, transformer: DbTestResultTransformer): T;
}, options: SqliteClientOptions): Promise<T>;
constructor(db: Database.Database, transformer: DbTestResultTransformer);
getRawConnection(): Database.Database;
close(): void;
query<T = unknown>(queryParams?: QueryParams, ...queryArgs: string[]): T;
write(testResult: ReporterTestResult): void;
delete(deleteParams?: DeleteParams, ...deleteArgs: string[]): void;
private _createSentence;
private _createValuesArray;
}
export {};