Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebDriverIO reporter #659

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ If your project is using a v1 reporter, check out the reporter's readme for the
| Playwright | `playwright-qase-reporter` | [✅ released](https://github.com/qase-tms/qase-javascript/tree/main/qase-playwright#readme) | [🗿deprecated](https://github.com/qase-tms/qase-javascript/tree/master/qase-playwright#readme) |
| Testcafe | `testcafe-reporter-qase` | [✅ released](https://github.com/qase-tms/qase-javascript/tree/main/qase-testcafe#readme) | [🗿deprecated](https://github.com/qase-tms/qase-javascript/tree/master/qase-testcafe#readme) |
| Mocha | `mocha-qase-reporter` | not available | [🧪 open beta](https://github.com/qase-tms/qase-javascript/tree/main/qase-mocha#readme) |
| WebDriverIO | `wdio-qase-reporter` | not available | [🧪 open beta](https://github.com/qase-tms/qase-javascript/tree/main/qase-wdio#readme) |
| **Qase JavaScript SDK** |
| Common functions library | `qase-javascript-commons` | [✅ released](https://github.com/qase-tms/qase-javascript/tree/main/qase-javascript-commons#readme) | not available |
| JavaScript API client | `qaseio` | [✅ released](https://github.com/qase-tms/qase-javascript/tree/main/qaseio#readme) | [🗿deprecated](https://github.com/qase-tms/qase-javascript/tree/master/qaseio#readme) |
Expand Down
181 changes: 178 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"qase-playwright",
"qase-testcafe",
"qase-mocha",
"qase-wdio",
"./examples/*"
],
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion qase-javascript-commons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qase-javascript-commons",
"version": "2.1.1",
"version": "2.1.2",
"description": "Qase JS Reporters",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions qase-javascript-commons/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { type TestResultType, Relation, Suite, SuiteData } from './test-result';
export { TestResultType, Relation, Suite, SuiteData } from './test-result';
export { TestExecution, TestStatusEnum } from './test-execution';
export { type TestStepType, StepType } from './test-step';
export { TestStepType, StepType } from './test-step';
export { StepStatusEnum } from './step-execution';
export { Attachment } from './attachment';
export { Report } from './report';
Expand Down
9 changes: 8 additions & 1 deletion qase-javascript-commons/src/models/step-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ export enum StepStatusEnum {
skipped = 'skipped',
}

export interface StepExecution {
export class StepExecution {
start_time: number | null;
status: StepStatusEnum;
end_time: number | null;
duration: number | null;

constructor() {
this.status = StepStatusEnum.passed;
this.start_time = null;
this.end_time = null;
this.duration = null;
}
}
13 changes: 11 additions & 2 deletions qase-javascript-commons/src/models/test-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ export enum TestStatusEnum {
invalid = 'invalid',
}

export interface TestExecution {
export class TestExecution {
start_time: number | null;
status: TestStatusEnum;
end_time: number | null;
duration: number | null;
stacktrace: string | null;
thread: string | null;
}

constructor() {
this.status = TestStatusEnum.passed;
this.start_time = null;
this.end_time = null;
this.duration = null;
this.stacktrace = null;
this.thread = null;
}
}
47 changes: 32 additions & 15 deletions qase-javascript-commons/src/models/test-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,38 @@ import { TestStepType } from './test-step';
import { Attachment } from './attachment';
import { TestExecution } from './test-execution';

export type TestResultType = {
id: string
title: string
signature: string
run_id: number | null
testops_id: number | number[] | null
execution: TestExecution
fields: Record<string, string>
attachments: Attachment[]
steps: TestStepType[]
params: Record<string, string>
author: string | null
relations: Relation | null
muted: boolean
message: string | null
export class TestResultType {
id: string;
title: string;
signature: string;
run_id: number | null;
testops_id: number | number[] | null;
execution: TestExecution;
fields: Record<string, string>;
attachments: Attachment[];
steps: TestStepType[];
params: Record<string, string>;
author: string | null;
relations: Relation | null;
muted: boolean;
message: string | null;

constructor(title: string) {
this.id = '';
this.title = title;
this.signature = '';
this.run_id = null;
this.testops_id = null;
this.execution = new TestExecution();
this.fields = {};
this.attachments = [];
this.steps = [];
this.params = {};
this.author = null;
this.relations = null;
this.muted = false;
this.message = null;
}
}

export type Relation = {
Expand Down
Loading
Loading