Reputation: 1408
I am not able to add a new step.
I need to add a step in my report for a negative scenario. I had referred the documentation https://www.npmjs.com/package/@wdio/allure-reporter.
const { addFeature } = require('@wdio/allure-reporter').default
describe('Suite', () => {
it('Case', () => {
addStep('**exceptions**')
})
})
I am using allure report 5.3.4
"@wdio/allure-reporter": "^5.3.4",
Upvotes: 0
Views: 1797
Reputation: 41
Based on your query i guess you need to add two things first the startStep Method and then try to add your addStep method.
const { addFeature } = require('@wdio/allure-reporter').default
describe('Suite', () => {
it('Case', () => {
startStep('*** negative test starts here *****')
addStep('**exceptions**')
endStep("passed") //Accepts two values passed or failed
})
})
Upvotes: 0
Reputation: 1408
I was able to figure out
import AllureReporter from '@wdio/allure-reporter';
it('************* *********', async () => {
await AllureReporter.addStep(`The ${ele} does not exist ..... `)
await AllureReporter.addStep(`The ${ele} does not exist ..... `)
})
Upvotes: 0