-
-
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 Report not showing all the scenarios outline mentioned in feature file though taking all screenshot for all scenario outline. #2190
Comments
Try with recent and consistent versions, e.g. https://github.com/serenity-bdd/serenity-core/blob/master/README.md#what-is-the-latest-stable-version-i-should-use |
I tried I am still getting Generating test results for 1 tests only. Only test2 scenario outline is getting reflected in serenity report. I dont know why this is happening. It is due to scenario outline? But when I using only 'Scenario' instead of 'Scenario Outline' without any examples , the report is getting generated with right no of scenarios. |
Scenario outlines should not be an issue. Please format your pom.xml content correctly so we can see what it contains. |
Here is my POM configuration:-
|
hey @rajaaryan4 , can you try with the latest serenity-cucumber5 ? |
Hi @cliviu , I tried with the latest serenity-cucumber5 and it gave the same result. Though all the scenarios outline were getting executed but only 1 result was showing up in the serenity report instead of two scenario outline.
|
this is strange, it should work. Can you please post a small example to help us reproduce the problem ? Also the exact command that you are using for running the tests. Thanks ! |
|
the best thing will be to make a github project and share it with us. Exactly the think that you are running. So I will be sure that we are on the same page. |
Hi It will be a while as the application I am trying to automate is controlled by client. I will try to create a sample project and share with you(this weekend). |
Please find attached the sample project. I have tried to keep it close to the project I have created for client. |
Try putting your feature files in a requirements directory structure under src/test/resources/features, not in src/test/java. |
I tried doing that as you suggested. I moved the feature files in the requirement directory under src/test/resources But still the report got generated with only one test (Scenario Outline) instead of both the scenarios Outline. Though all the scenarios outline got executed. |
Start with one of the starter projects and add your feature files, following the Cucumber/Serenity conventions. |
I will start with a fresh project and will let you know. |
I started fresh and took another project ,did everything following Cucumber/Serenity conventions but still only 1 scenario showing up in report. In my original project I am reading the value from an excel sheet. Is that the issue? |
hi @rajaaryan4. I suggest that you start with such a clean base https://github.com/serenity-bdd/serenity-cucumber5-starter . Just add a feature with two scenario outlines and convince yourself that the filtering works. On this clean base you can start to add your functionality little by little and recognize the part that is causing problems. |
@rajaaryan4 , please try this project : https://github.com/cliviu/serenity-cucumber5-starter.git and run the following command |
@cliviu Thanks a lot. Will try and let you know. |
@cliviu The issue is resolved. I created the project as suggested by you. I am able to see all the scenarios in the serenity report. |
Feature file:-
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features = {"features"}, glue = {"stepdefinitons"},plugin={"pretty"})
public class serenity runner{
}
I have two scenario outline in feature file
@test1
Scenario Outline: Verification of Login as user 1
Given I login in to app as user
When I give credentials
Then I see the details page
Examples:
|x|y|
|abc|asx|
@test2
Scenario Outline: Verification of testing user
Give I login into app2 as user
When I give credentials
Then I see user name and details application
Examples:
|z|w|
|fdgdfg|gfdg|
Pom configuration:-
<serenity.version>2.0.23</serenity.version>
<serenity.maven.version>2.2.9</serenity.maven.version>
<serenity.cucumber.version>1.9.21</serenity.cucumber.version>
<maven.compiler.version>3.8.0</maven.compiler.version>
org.apache.maven.plugins
maven-surefire-plugin
2.22.1
false
maven-failsafe-plugin
2.22.1
%regex[.Runner.]
**/*TestSuite.java
<webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
classes
${parallel.tests}
${parallel.tests}
integration-test
verify
net.serenity-bdd.maven.plugins
serenity-maven-plugin
${serenity.maven.version}
${tags}
serenity-reports
post-integration-test
aggregate
Goals:
clean verify -Dcucumber.options="--tags '@test1 or test2'"
Results:
Tests run: 2, failures: 0, Errors: 0, skipped: 0
but Serenity tests result shows as below
SERENITY TESTS: SUCCESS
|Test executed | 1
|Test passed | 1
|Tests with errors | 0
|Tests ignored/skipped | 0
The reports contains only @test2 Scenario outline but it does not contain @test1 scenario outline.
I checked the serenity report folder and it has sceenshot for @test1 Scenario outline too. I dont know why this is happening.
The text was updated successfully, but these errors were encountered: