For running test locally: Enter the following in the command line
mvn clean verify "-Dcucumber.options= --tags @smokes-ui"
For running test on gitlab:
- Go to https://gitlab.com/alexandr220v/waarkoop-test/-/pipelines
- Run pipeline
- Wait and find serenity reports: example
[INFO] -----------------------------------------
[INFO] SERENITY TESTS : FAILURE
[INFO] -----------------------------------------
[INFO] | Tests executed | 4
[INFO] | Tests passed | 3
[INFO] | Tests failed | 1
[INFO] | Tests with errors | 0
[INFO] | Tests compromised | 0
[INFO] | Tests pending | 0
[INFO] | Tests ignored/skipped | 0
[INFO] ------------------------ | --------------
[INFO] | Total Duration | 10s 781ms
[INFO] | Fastest test took | 619ms
[INFO] | Slowest test took | 7s 793ms
- Java 17
- Maven
- Cucumber plugin for Intellij Idea
###Refactored:
- Test scenario refactored to parametrized
- Using assetJ instead of RestAssured assertion
- Using DTO for tets data transfer
- Added response attribute verification , verify status code is not enough
- Reduce hardcoded methods with one parameters
- Added rest assured simple logs
###Bugs: Found bugs in product endpoint(left comments under method in step definition ) //there is a bug in search results for apple - title is "Organix Knijpfruit Appel, Aardbei & Quinoa 12 Maanden 100 g" not contains apple //there is a bug in search results for mango - title is "Bonbébé Appel Perzik Banaan Pouch 6 Maanden 90 g" not contains mango