This is a technical test project for Serenity with Cucumber and RestAssured using Java programming language & Maven software project/build/dependencies management tool.
- Oracle Java 17 / OpenJDK 17
- Apache Maven 3.9.1 or latest
- Git 2.40.0 or latest
- Taken the test project from the provided
- Removed the gradle related files
- Using only Maven related files like pom.xml
- Written the positive & negative test cases/scenarios in the cucumber feature file using gherkin format (GWT - Given, When & Then) as in /src/test/resources/features/api/*.feature
- Implemented the step definitions for each step in the feature file on the stepdef class under /src/test/java
- Implemented the methods on the *API class for hitting the endpoint and for assertions
- Configured the serenity.conf file under the /src/test/resources directory where I have configured different environment uris in case
- Written the Response based on the fields of the response with Getters & Setters of the Lombok plugin
- mvn clean verify -Dcucumber.filter.tags=@e2e -DrerunFailingTestsCount=2 (OR) mvn clean verify
- Once ran successfully without any issues, we should be able to see the test report under the /target/site/serenity/index.html in a web browser
- Then we can examine the passed & failed tests with summary of statistics of the tests & execution time
- Whenever there is any push or any pull request to the main branch, then the CI/CD workflow happens as action as in maven.yml file on GitHub
- Once ran, we should be able to see the report artifacts
- Can download the Artifacts which will be downloaded as zip file
- Unzip and extract the files
- Double-click on the index.html file to open in a browser to view the Serenity Test Report finally!!!