Skip to content

Modify how suites are counted #145

Answered by Shelex
pedrHenrique asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @pedrHenrique
Yes, there was long-living feature request for this - #100 , and it seems Suite structuring feature in v2.29.0 could be used to address your case too.

The function with your custom logic of defining what should be a suite could be placed in cypress/support/index.js (or e2e.js if you have cypress v10+, in the same file where you do import '@shelex/cypress-allure-plugin';).

In order to leave just last suite being displayed in allure you can remove all its' parents with:

Cypress.Allure.reporter
    .getInterface()
    .defineSuiteLabels((titlePath, fileInfo) => {
        return [titlePath.pop()];
    });

So it will leave just last describe block: Test 1, Test 2.1, Test 2.2, …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Shelex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants