Search code examples
mocha.jsallurewdio-v4

How to addStep in @wdio/allure-reporter with wdio mocha


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",

Solution

  • 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 ..... `)
    
    })
    

    enter image description here