@gurglosa/playwright-zephyr-jira-reporter
Version:
A custom Playwright reporter that syncs test results to Zephyr Scale and creates Jira bugs on failures.
31 lines (30 loc) • 939 B
TypeScript
import { Reporter, TestCase, TestResult } from '@playwright/test/reporter';
interface MainReporterConfig {
Zephyr_Base_URL: string;
Zephyr_Access_Token: string;
Zephyr_Test_Cycle_ID: string;
Zephyr_Test_Project_Key: string;
Zephyr_Enabled: boolean;
Jira_Base_URL: string;
Jira_Access_Token: string;
Jira_Email: string;
Jira_project_Key: string;
Jira_Enabled: string;
}
declare class ZephyrJiraReporter implements Reporter {
private zephyrService;
private jiraService;
private config;
private testResults;
constructor(config: MainReporterConfig);
onTestEnd(testCase: TestCase, testResult: TestResult): void;
onEnd(): Promise<void>;
private handleJiraIssue;
private createNewJiraIssue;
private getTransitionName;
private extractTestScript;
private stripAnsiCodes;
private extractKeys;
private mapTestStatus;
}
export default ZephyrJiraReporter;