This is fully configurable UI and API automation framework based on BDD testing concept using Serenity, Cucumber, Java technologies. Configurable for parallel and cross-browser automation if needed.
Projects was designed using Page Object pattern in mixture with Step Design Pattern.
- Java 11
- Maven 3
- Selenium
- Serenity 2
- Cucumber 6
- JUnit 4
- Hamcrest 1.3
- Rest Assured 2
See the pom.xml for details.
To run project for sequential test run:
- maven console
clean verify "-Dcucumber.filter.tags=@{tagname} or @{tagname}" -U
- for running specific stories by tags with {tagname} just add parameter
"-Dcucumber.filter.tags=@{tagname} or @{tagname}"
For parallel run of stories:
- add parameter in maven console
-Dparallel=methods
NOTE: Basically it has current preset to 4 instances.
By default, the tests will run using Chrome. You can run them in Firefox by overriding the driver system property, e.g.
clean verify -Ddriver=firefox
The Full Serenity reports are generated by the serenity-maven-plugin in pom.xml.
You can trigger this by running:
serenity:aggregate
or just run your tests in maven by:
clean verify
from the command line or from your IDE.
They reports are also integrated into the Maven build process.
The reports to be generated automatically once all the tests have completed when you run mvn verify.
Tricks:
- you can easily configure max number of parallel stories(tests):
<parallel.tests>{number}</parallel.tests>inpom.xml - you can look for the reports after the first run in folder:
target/site/serenity/index.html - or just one page report in folder:
/target/site/serenity/serenity-summary.html - for JUnit running also just run this class:
src/test/java/com/flink/AcceptanceTestSuite.java - all configuration of selenium drivers for platforms and environments simply can be set here:
src/test/resources/serenity.conf
For any Serenity Cucumber extras please look: github.com