Skip to content

[Question] Can we overwrite name of scenario in allure reporter or not? #2728

Description

@golfzaptw

I need to add some prefix when the scenario used retry plugin for each case in my report like this
Screen Shot 2563-12-21 at 16 21 52
Is it possible?

My simple test

const { configuration, I } = inject()

let tries = 0

Feature('Retry in workers').retry(configuration.reRunTimes)
codeceptjs.event.dispatcher.on(codeceptjs.event.test.passed, (test) => {
    const retryTimes = test.retryNum
    const msgRetry = `Retry ${retryTimes} times`
    if (retryTimes > 0) {
        I.say(msgRetry)
    }
    test.title = 'new test'
})

Scenario('Passed scenario', () => {
    I.assertEqual(tries, 0)
}).tag('retryTest')

Scenario('Flaky scenario', () => {
    tries++
    I.assertEqual(tries, 3)
}).tag('retryTest')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions