To run this project, you will need JDK 8 , Maven and Git. You will also need a modern Java IDE such as IntelliJ IDE (this is our recommendation - the free Community Edition will do fine). Make sure that the bundled Cucumber for Java plugin is enabled.
Git:
git clone https://github.com/FranciscoSanQA/adidas-test-automation.git
Open a command window and run:
mvn clean verify
This command will run all the tests
##Running scenarios by tags
With Cucumber framework, you need to use the cucumber.options system property for tests filtering:
mvn clean verify -Dtags="WebFE"
Run ApiRest Test by filtering:
mvn clean verify -Dtags="ApiRest"
Run your tests using the Chrome WebDriver, providing a context called "chrome"
mvn verify -Dcontext=chrome -Dwebdriver.driver=chrome
Run the tests again (or in parallel, on a different machine) using Firefox:
mvn verify -Dcontext=firefox -Dwebdriver.driver=firefox
Serenity will add a "context" tag to each of your tests, but you might want to make your reports even clearer by adding a more meaningful tag. You can do this using the "injected.tags" system property:
mvn verify -Dcontext=chrome -Dwebdriver.driver=chrome -Dinjected.tags="browser:chrome"
Once the tests have completed, open a command window and run:
mvn serenity:aggregate -Dserenity.outputDirectory=serenity-reports
This command will generate the report that it is going to be in the following path:
serenity-report
The command provided above will produce a Serenity test report in the serenity-reports
directory. Go take a look!