For run new REST API test automation just download and open this project Powered by JDI Dark
Can be found here
-
Download template and unpack in appropriate folder
-
Open project in IDE (for example IntelliJIdea) by selecting pom.xml or build.gradle
-
For running demo test just use "mvn clean install" command for maven or "gradlew clean build" for Gradle or run via IDE by click on "example" folder in src/test and select "Run tests" https://pix.my/KN34uk
-
Logs: Observe test run results in Console log https://pix.my/SXy52C
-
Reporting: After running tests run allure:serve in maven plugins https://pix.my/meAto8 or allureServe in gradle task https://pix.my/6FXX7l
-
Use as template for your project:
- just remove all content from src/main/.../example folder, add your package you Service Objects
- replace tests in src/test/.../example folder with your tests
- For running parameterized builds (e.g. in CI/CD tools) you can use profiles:
- Gradle:
gradlew clean build -PBUILD_PROFILE=name of your .properties file placed in src/test/resources
or
gradlew clean build -DBUILD_PROFILE=name of your .properties file placed in src/test/resources
or
EXPORT BUILD_PROFILE=name of your .properties file placed in src/test/resources && gradlew clean build
- Maven:
mvn clean install -DBUILD_PROFILE=name of your .properties file placed in src/test/resources
or
EXPORT BUILD_PROFILE=name of your .properties file placed in src/test/resources && mvn clean install