I want to use { grep: process.env.profile}
in my codecept.conf.js and then e.g. Scenario(...).tag("dev")
(or the same for Feature(...)).
So if I run test with --profile dev
, the above scenario will be executed. And it will be skipped for --profile prod
.
Please help me, anyone, where I exactly use the { grep: process.env.profile}
in my codecept.conf.js file.
const { setHeadlessWhen } = require('@codeceptjs/configure');
// turn on headless mode when running with HEADLESS=true environment variable
// export HEADLESS=true && npx codeceptjs run
setHeadlessWhen(process.env.HEADLESS);
exports.config = {
tests: './*_test.js',
output: './output',
helpers: {
Puppeteer: {
url: 'https://www.eme.com',
show: true,
}
},
include: {
I: './steps_file.js'
},
bootstrap: null,
mocha: {},
name: 'extramarks_puppeteer',
plugins: {
pauseOnFail: {},
retryFailedStep: {
enabled: true
},
tryTo: {
enabled: true
},
screenshotOnFail: {
enabled: true
}
}
}