Shelex / cypress-allure-plugin

cypress plugin to use allure reporter api in tests
https://shelex.github.io/cypress-allure-plugin-example/
Apache License 2.0
159 stars 44 forks source link

SubSuites for skiped tests #58

Closed yannay000 closed 3 years ago

yannay000 commented 3 years ago

Describe the bug Tests with label subSuite and with mark skip lose their suites.

Example

describe('suiteName', function(){

}

Current behavior Test testName will be situated in folder suiteName.

Desired behavior Test testName should be situated in subfolder subSuiteName in folder suiteName.

maga-polito commented 3 years ago

Having the same issue using cucumber

Shelex commented 3 years ago

@yannay000 @maga-polito

Thank you for information provided. The source of issue is that labels like suite/subsuite/parentsuite and others could be applied to allure test only, so I have published v2.4.0 where there is new label storage feature. When there is no test, plugin gathers these labels and applies them to each test in that suite (describe block).

describe('label storage', () => {
    const allure = Cypress.Allure.reporter.getInterface();
    allure.label('subSuite', 'global sub suite');

    it.skip('skipped should be in global sub suite', () => {
        allure.label('subSuite', 'local sub suite from skipped');
        expect(true).to.be.eq(true);
    });

    it('should be in global sub suite', () => {
        expect(true).to.be.eq(true);
    });

    it('should be in local sub suite', () => {
        allure.label('subSuite', 'local sub suite');
        expect(true).to.be.eq(true);
    });
});
labelStorageReport