prashant-ramcharan / courgette-jvm

Multiprocess | Parallel Cucumber-JVM | Parallelize your Java Cucumber tests on a feature level or on a scenario level.
MIT License
130 stars 38 forks source link

Report only show the latest feature #347

Closed jairomendezonetec closed 1 year ago

jairomendezonetec commented 1 year ago

Good morning,

I am having problems with the cucumber report.

When I execute some differents features, the final cucumber report only contains the latest feature,

I have the version 6.5.1

Thanks a lot

prashant-ramcharan commented 1 year ago

Hi,

Can you please provide more information?

  1. How many tests are you expecting to see in the report?
  2. Do you get the same result when running Cucumber directly?
  3. Does the Courgette report show more than one feature?
  4. Can you provide the Cucumber json and html reports (if possible) ?
  5. Is this repeatable and do you get the same result when using the Courgette example project ? https://github.com/prashant-ramcharan/courgette-jvm-example
jairomendezonetec commented 1 year ago

Hi,

I am executing 2 tests for example, one fails and another passes,
image

Before, I had the courguette version 5.1.2 and it worked correctly

Courguette and cucumber report show only the latest feature executed: image

The cucumber report is: [{"line":1,"elements":[{"start_timestamp":"2022-08-10T07:25:05.756Z","before":[{"output":["Android Device: Pixel2"],"result":{"duration":25519000000,"status":"passed"},"match":{"location":"stepdefinition.Hooks.before(io.cucumber.java.Scenario)"}}],"line":4,"name":"HOME_001 - Validación de pantalla home","description":"","id":"casos-de-prueba-de-home;home-001---validación-de-pantalla-home","after":[{"result":{"duration":1000000,"status":"passed"},"match":{"location":"stepdefinition.Hooks.embedScreenshot(io.cucumber.java.Scenario)"}},{"result":{"duration":852000000,"status":"passed"},"match":{"location":"stepdefinition.Hooks.after()"}}],"type":"scenario","keyword":"Scenario","steps":[{"result":{"duration":86202000000,"status":"passed"},"line":5,"name":"El usuario hace Log In","match":{"location":"stepdefinition.LoginStepDefinition.login(io.cucumber.datatable.DataTable)"},"rows":[{"cells":["Email","jairo.mendez@grupoonetec.com"]},{"cells":["Password","-Acceso01"]}],"keyword":"Given "},{"result":{"error_message":"java.lang.InterruptedException: [xpath, //ion-tab-button//*[text()='Home'], Home] has not been found in 10s\r\n\tat framework.AppiumKeyword.verify(AppiumKeyword.java:142)\r\n\tat pageobject.HomePage.verifyScreen(HomePage.java:49)\r\n\tat stepdefinition.HomeStepDefinition.verifyScreen(HomeStepDefinition.java:11)\r\n\tat ✽.El usuario tiene las siguientes acciones en la home:(file:///C:/Users/user/Desktop/Jairo/01.Proyectos/17-Impulsyn/01.Pruebas_Automaticas/01_Impulsyn/01_Impulsyn_Appium/src/test/resources/features/Home.feature:8)\r\n","duration":60137000000,"status":"failed"},"line":8,"name":"El usuario tiene las siguientes acciones en la home:","match":{"location":"stepdefinition.HomeStepDefinition.verifyScreen(io.cucumber.datatable.DataTable)"},"rows":[{"cells":["Home"]},{"cells":["Networking"]},{"cells":["Jobs"]},{"cells":["Notifications"]},{"cells":["Boost"]},{"cells":["Search"]},{"cells":["Message"]},{"cells":["Menu"]}],"keyword":"Then "}],"tags":[{"name":"@home"},{"name":"@home_001"},{"name":"@complete"},{"name":"@ios"},{"name":"@android"}]}],"name":"Casos de prueba de HOME","description":"","id":"casos-de-prueba-de-home","keyword":"Feature","uri":"file:src/test/resources/features/Home.feature","tags":[]}]

Thanks

prashant-ramcharan commented 1 year ago

Hi,

Looking at the console logs, I can see that Courgette was not able to create the Cucumber reports.

[Courgette Runner] There was an unexpected error processing the individual Cucumber report files and Courgette was unable to create any reports for this test run.

This usually happens when you have an issues with your tests / setup etc..

Can you ensure that all your tests pass and that there are no errors to see if Courgette is able to create the Cucumber reports?

jairomendezonetec commented 1 year ago

This is another example, where both test are passing,

image

Runner is this: image

jairomendezonetec commented 1 year ago

In the version 5.11.0, with the same tests, i can see the report correctly, and the report is published also

prashant-ramcharan commented 1 year ago

Yes this is because all tests passed!

jairomendezonetec commented 1 year ago

But before with version 5.11.0, Courguette generated always reports.

prashant-ramcharan commented 1 year ago

Please provide a project so that I can reproduce this. Thanks!

jairomendezonetec commented 1 year ago

Sorry, the problem was with junit version ! thanks and excuse me

prashant-ramcharan commented 1 year ago

No problem @jairomendezonetec 👍 Glad its working!