Spring-Boot-Asynchronous-API is a sample project showcasing the implementation of an asynchronous API built using Spring Boot. It offers asynchronous endpoints, allowing for concurrent and non-blocking execution, making it an excellent foundation for developing more complex systems.
- Java 19
- Maven 3.3.9
- Spring Boot 3.1.0
git clone https://github.com/Raouf25/spring-boot-asynchronous-api.git
Once you've cloned the project, you can run it with the following command:
mvn spring-boot:run
Once the server is up and running, you can access the web service at http://localhost:8080/.
You can run non-regression tests locally with the following command:
mvn clean test -D"skip.tests"=false -Plocal -Dapi.url=http://localhost:8080
To run Gatling loading tests locally, navigate to the loading directory and use the following command:
cd loading
mvn -Dgatling.simulation.name=HttpSimulation4 clean gatling:test
Github Actions is a CI/CD platform that allows developers to automate their workflow with custom scripts. This project contains a Github Action workflow that executes the following steps:
-
Checkout the source code
-
Build the application
-
Run unit & integration tests
-
Deploy in Dev environment
-
Run non regression tests & publish the generated reports
The workflow also runs non-regression tests as part of the build process. The reports are published to the
reports
directory and can be accessed from the Github Actions UI. The reports can also be generated locally using themvn test
command. -
Run loading tests & publish the generated reports
For more information, please refer to the :
- Testing a Java Spring Boot REST API with Karate
- jacoco-multi-module-sample
- jacoco and sonar
- gatling loading test
- gatling loading test project
The project building steps are as follows:
- ✅ Implement the REST API. You can access the Swagger documentation
- ✅ Perform Non-Regression Testing. Review Karate report
- ✅ Monitor and Improve Code Coverage. View code coverage in sonar
- ✅ Run Loading Tests. Explore the Gatling report
- 🚧 Ongoing work on CI/CD and releases.