Modify how suites are counted #145
-
Hi, I would like to know if there is any way that I could change how suites number are counted in the Allure Report generated, in a way that the example below would result In a different number of suites Example:
Instead of returning only 1 suite in the report, I would like to return 3, is it possible? I'm trying to do this to organize better my report, and this would help a lot me 😁 Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @pedrHenrique The function with your custom logic of defining what should be a suite could be placed in 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: |
Beta Was this translation helpful? Give feedback.
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
(ore2e.js
if you have cypress v10+, in the same file where you doimport '@shelex/cypress-allure-plugin';
).In order to leave just last suite being displayed in allure you can remove all its' parents with:
So it will leave just last describe block:
Test 1
,Test 2.1
,Test 2.2
, …