-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now, the reporter will correctly handle the test runs and will not create duplicate test runs in the Qase TMS.
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { ConfigLoader, QaseReporter } from 'qase-javascript-commons'; | ||
|
||
export async function beforeRunHook() { | ||
const configLoader = new ConfigLoader(); | ||
const config = configLoader.load(); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
const reporter = QaseReporter.getInstance({ | ||
...config, | ||
frameworkPackage: 'wdio', | ||
frameworkName: 'wdio', | ||
reporterName: 'wdio-qase-reporter', | ||
}); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call | ||
await reporter.startTestRunAsync(); | ||
} | ||
|
||
export async function afterRunHook() { | ||
const configLoader = new ConfigLoader(); | ||
const config = configLoader.load(); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument | ||
const reporter = QaseReporter.getInstance({ | ||
...config, | ||
frameworkPackage: 'wdio', | ||
frameworkName: 'wdio', | ||
reporterName: 'wdio-qase-reporter', | ||
}); | ||
|
||
await reporter.complete(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import WDIOQaseReporter from './reporter.js'; | ||
|
||
export * from './wdio'; | ||
export * from './hooks'; | ||
export default WDIOQaseReporter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters