Update
Updating from v2.1 to v2.2
To update an existing test project using Qase reporter from version 2.1 to version 2.2, run the following steps:
-
Add a metadata in the
e2e
section ofcypress.config.js
... e2e: { setupNodeEvents(on, config) { require('cypress-qase-reporter/plugin')(on, config) + require('cypress-qase-reporter/metadata')(on) } } ...
Updating from v1.x to v2.1
To update an existing test project using Qase reporter from version 1 to version 2.1, run the following steps:
-
Change import paths in your test files:
- import { qase } from 'cypress-qase-reporter/dist/mocha' + import { qase } from 'cypress-qase-reporter/mocha'
-
Update reporter configuration in
cypress.config.js
and/or environment variables — see the configuration reference below. -
Add a hook in the
e2e
section ofcypress.config.js
:... e2e: { + setupNodeEvents(on, config) { + require('cypress-qase-reporter/plugin')(on, config) } } ...
If you already override
before:run
orafter:run
hooks in yourcypress.config.js
, use this instead:const { beforeRunHook, afterRunHook } = require('cypress-qase-reporter/hooks'); ... e2e: { setupNodeEvents(on, config) { + on('before:run', async () => { + console.log('override before:run'); + await beforeRunHook(config); + }); + on('after:run', async () => { + console.log('override after:run'); + await afterRunHook(config); + }); }, }, ...