A repository to experiment with testing concepts and frameworks
The core of this application is framework independent. Adapters and applications of this core are implemented for the following frameworks:
- Quarkus (Java and native)
- Spring Boot
The applications can be built with the following command:
./gradlew buildThe Quarkus application can be built with the following command:
./gradlew :products:quarkus:app:buildIf you want to build a native image you can do this by:
- Installing a compatible version of GraalVM. If you have SDKMAN! installed you can install it by running:
sdk install java 21.3.0.r17-grlNOTE: You do not need GraalVM if you build via Docker by passing -Dquarkus.native.container-build=true to the
Quarkus-Build task mentioned below. However, per default the building via Docker will build a Linux-specific
application (which you would have to run in Docker unless your OS is Linux).
- Executing the Quarkus-Build task with the package type
native:
./gradlew quarkusBuild -Dquarkus.package.type=nativeNOTE: The build process requires at least 8GB of RAM (if you build via Docker you might have to change the memory settings of the Docker daemon).
The Spring Boot application can be built with the following command:
./gradlew :products:spring-boot:app:buildThe Quarkus application can be run in dev-Mode by executing:
./gradlew :products:quarkus:app:quarkusDevThe Dev UI is available under http://localhost:8080/api/q/dev/.
The Swagger UI is available under http://localhost:8080/api/q/swagger-ui/
For performance testing use:
./gradlew :products:quarkus:app:runor if you have build a native application the executable located under ch.resrc.testing/products/quarkus/app/build/:
./app-0.0.1-SNAPSHOT-runnerThe Spring Boot application can be run by executing:
./gradlew products:spring-boot:app:bootRunFor performance testing use:
./gradlew products:spring-boot:app:runThe performance test suite can be executed against all applications (i.e. Quarkus, Quarkus native and Spring Boot) since they run on the same port per default and expose the same endpoints. The results are comparable since the application core is exactly the same in all of the applications.
Follow these steps to execute the performance test scenarios:
- Build the application
- Run the application using the command for performance tests
- Execute
./gradlew gatlingRun - Open the report located under
ch.resrc.testing/tests/performance/gatling/build/reports/gatling. Each run will produce a new report in a folder in the mentioned directory.