Skip to content

Commit

Permalink
release: qase-wdio 1.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gibiw committed Sep 3, 2024
1 parent fb9d0de commit ba727be
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
12 changes: 12 additions & 0 deletions qase-wdio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,25 @@ Also, you need to configure the reporter using the `wdio.conf.ts` file:
// wdio.conf.ts
import WDIOQaseReporter from 'wdio-qase-reporter';
import type { Options } from '@wdio/types';
import { afterRunHook, beforeRunHook } from 'wdio-qase-reporter';

export const config: Options.Testrunner = {
reporters: [[WDIOQaseReporter, {
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
useCucumber: false,
}]],

// ...
// =====
// Hooks
// =====
onPrepare: async function() {
await beforeRunHook();
},
onComplete: async function() {
await afterRunHook();
},
// ... other options
};
```
Expand Down
50 changes: 50 additions & 0 deletions qase-wdio/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# [email protected]

## What's new

- Fix an issue with `cucumber` steps. Now, the reporter will correctly handle the `cucumber` steps and will report them
to the Qase TMS.
- Fix an issue with duplicate test runs. Now, the reporter will correctly handle the test runs and will not create
duplicate test runs in the Qase TMS.

You need to add `beforeRunHook` hook to the `onPrepare` and `afterRunHook` hook to the `onComplete` in the
`wdio.conf.ts` configuration file:

```ts
import type { Options } from '@wdio/types'
import WDIOQaseReporter from "wdio-qase-reporter";
import { afterRunHook, beforeRunHook } from "wdio-qase-reporter";

export const config: Options.Testrunner = {
// ...
//
// =====
// Hooks
// =====
// WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
// it and to build services around it. You can either apply a single function or an array of
// methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
// resolved to continue.
/**
* Gets executed once before all workers get launched.
* @param {object} config wdio configuration object
* @param {Array.<Object>} capabilities list of capabilities details
*/
onPrepare: async function() {
await beforeRunHook();
},

/**
* Gets executed after all workers got shut down and the process is about to exit. An error
* thrown in the onComplete hook will result in the test run failing.
* @param {object} exitCode 0 - success, 1 - fail
* @param {object} config wdio configuration object
* @param {Array.<Object>} capabilities list of capabilities details
* @param {<Object>} results object containing test results
*/
onComplete: async function() {
await afterRunHook();
},
}
```

# qase-wdio@1.0.0-beta.2

## What's new
Expand Down
2 changes: 1 addition & 1 deletion qase-wdio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wdio-qase-reporter",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "Qase WebDriverIO Reporter",
"homepage": "https://github.com/qase-tms/qase-javascript",
"sideEffects": false,
Expand Down

0 comments on commit ba727be

Please sign in to comment.