❗ THIS IS NOT AN INSTALLATION INSTRUCTION ❗ On details of how to set up Drill4J for you project please refer to Drill4J documentation
Example project - Realworld App
- Backend: Java + Spring Boot
- Frontend: JS + Angular
Drill4J services:
- Drill4J UI - manage API keys
- Metabase - view metrics
- Drill4J Backend - main backend. Collects metrics and hosts API
-
-
It is recommended to use latest versions. Demo is created with:
Docker version 27.1.1, build 6312585 Docker Compose version v2.29.1-desktop.1
-
-
Java 8/1.8 or later
-
Clone project
git clone https://github.com/Drill4J/realworld-demo.git; cd realworld-demo
-
Deploy Drill4J services:
- Navigate to
/docker
folder - Launch script
./start-drill4j-services.sh
- Wait for the docker-compose to start all services
- Navigate to
-
Deploy Realworld App
- Make sure to be in the
/docker
folder - Launch script
./start-realworld.sh
- Make sure to be in the
-
Open the following link http://localhost:8095 to access Metabase
- Login using the credentials
# email user@user.user # password useruser1
-
Open Builds page to view available application versions.
- Click on individual build title (e.g.
realworld:backend:0.1.0
) to see metrics.
- Click on individual build title (e.g.
-
Execute tests for
realworld:backend:0.1.0
build- Navigate back to repository root
- Execute script
./test.sh build1
- Wait for the tests to complete (you will see the message in the terminal)
-
Look at metrics for
realworld:backend:0.1.0
again.- Notice how Drill4J collected coverage and grouped it for each distinct test
-
Look at metrics for
realworld:backend:0.2.0
build- Set
"Baseline Build"
filter value torealworld:backend:0.1.0
- Now you should see two new mterics - "Changes" and "Recommended tests". This data is infered based on metrics collected for
realworld:backend:0.1.0
and changes introduced with0.2.0
version.
- Set
-
Execute tests for
realworld:backend:0.2.0
build./test.sh build2
-
Look at metrics for
realworld:backend:0.2.0
again. You should see that:- coverage % increased
- number of untested changes reduced
- Navigate to
docker
folder - Execute
teardown.sh
script