-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serenity summary full report does not show correct count of test cases #3207
Comments
Facing this in latest serenity-maven-plugin v3.9.8 (since v2.0.91 when I started using serenity) |
Can you provide a sample project to reproduce the issue? |
I can't reproduce this issue. |
Working on creating the sample project to reproduce the issue. I will keep you updated. |
Thank you @akshayrane308 for trying to create the project for reproduction. I have the same problem, but cannot reproduce it outside of my work. The problem exists for me too, and I don't how to find out where is the problem. |
Make sure you are using serenity-core 3.9.8 or higher |
@wakaleo thanks for your quick response, but I'd like to use 3.9.8 instead of 3.9.7, but I cannot because I don't know where Injectors.java from guice (serenity model) was moved. Could you please provide how to import Injectors? or they were deprecated? |
Guice is no longer supported - if you are calling the Serenity internals, you should now use either the |
Today I tested version 4.0.0.beta-1 and had the same situation with wrong count tests. Serenity treats every step in the test as a test case. |
I have never seen this behaviour. Can you provide a sample project that reproduces this issue? |
I cannot do that because it is hard to reproduce, I hope that @akshayrane308 can create the sample project with this issue. |
The problem may be project-specific. In that case, a commercial support contract would be the best way to resolve the issue quickly. |
I am working on this, will keep you posted |
@akshayrane308 , Thanks! I have been waiting for your work |
@akshayrane308 Hello, do you have any updates from Your side? |
Try with 4.0.12. |
Tried, the same situation. |
@Darenth Without a project to reproduce this issue, it will not be possible to fix outside of a commercial support package (where we can look at your code directly). |
When a scenario is "Broken" (test result status: Broken) in the @before code i.e. before executing the actual scenario steps, the full report does not show the correct count of test cases. The report shows the total tests on the very first page (dashboard) as the count of all scenario steps instead of the count of the scenarios/scenario outlines. Also, the Test outcomes and performance graphs too shows the incorrect count
Dummy example:
Consider below scenario with 9 steps:
Given I am on the serenity shopping site
And I search for iPhone X
When I add iPhone X to the cart
And proceed to checkout
And enter billing address
And enter shipping address
And enter payment details
And place the order
Then I should see the order placed confirmation message
Assume the scenario has below Serenity steps (annotated by @step) in Before Hook annotation:
Assume the scenario has below Serenity steps (annotated by @step) in After Hook annotation:
Now, assume the scenario runs in below manner:
The serenity full report shows the test count as below:
Total Tests: 14 (1 + 9 + 4)
Pass: considers all 4 @after hook steps as individual test case
Skipped: considers all 9 Scenario steps as individual test case
Fail: considers entire @before hook steps as single test case
Expectation:
Total Tests: 1
Pass: 0
Broken: 1
Fail: 0
@wakaleo I have been struggling with this since when I started using serenity from last 2 years. Can you please check this and let me know if this can be fixed or otherwise.
The text was updated successfully, but these errors were encountered: