serenity-bdd / serenity-cucumber4

Other
13 stars 10 forks source link

Aggregated report from gradle submodules contains features from one module only #25

Open arturobhn opened 4 years ago

arturobhn commented 4 years ago

While sending test reports generated by gradle submodules to a single folder in the root, and then running aggregate on that folder, generates a report with missing information like: Overall Test Results Tab -- OK contains all the tests scenarios Requirements Tab -- NOT OK contains information of a single scenario, meaning info from one gradle submodule only, rather than containing info from all gradle submodules. I'm using these versions as per the started:

buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath("net.serenity-bdd:serenity-gradle-plugin:2.0.70")

    }
}

configurations.all {
    resolutionStrategy {
        force "io.cucumber:cucumber-core:4.2.0"
    }
}

dependencies {
    testCompile "net.serenity-bdd:serenity-core:2.0.70",
                "net.serenity-bdd:serenity-cucumber4:1.0.21",
                "io.cucumber:cucumber-core:4.2.0",
                "io.cucumber:cucumber-junit:4.2.0"
}

We can see here 2 scenarios reported:

Screen Shot 2020-05-06 at 10 17 28 PM

And here we can see a single one listed in Requirements Tab:

Screen Shot 2020-05-06 at 10 17 44 PM

Please let me know if you need further details. Regards!

wakaleo commented 4 years ago

Could you try with the latest version and Cucumber 5?

arturobhn commented 4 years ago

Hello @wakaleo, I have updated the versions as advised, they now look like this:

defaultTasks 'clean','test','aggregate'
repositories {
    mavenLocal()
    jcenter()
}

buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath("net.serenity-bdd:serenity-gradle-plugin:2.2.0")
    }
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
    compile "ch.qos.logback:logback-classic:1.2.3"
    testCompile "net.serenity-bdd:serenity-core:2.2.0",
                "net.serenity-bdd:serenity-cucumber5:2.2.0",
                "junit:junit:4.12"
}
test.finalizedBy(aggregate)

After that, it did not work either so I simplified the scenario and now I tried to generate a report for a single submodule on its default reporting folder, however, although the test passed and the report is generated; somehow Requirements Tab is still empty. Is there any special consideration for it to display the features? I have compared the started project and they look all the same. See following screenshots:

Here we can see the report was generated and it contains a feature and an scenario:

Screen Shot 2020-05-07 at 8 07 29 AM

And then, here we can see Requirements Tab is no listing the feature:

Screen Shot 2020-05-07 at 8 07 45 AM

One importante thing to note is, I'm triggering this gradle task from the root project, if I run it directly from inside the submodule, the report is generated correctly.

The point is, what would happen if someone needs to run it from the root so all modules send their outputs to the root and then root can execute :aggregate.

Please let me know if any further details are required. Regards

arturobhn commented 4 years ago

I would add one more comment, the scenario we are trying to cover when we found out this issue is:

I hope this provides more clarity about the issue.