Skip to content

Demo of Drill4J integration for https://github.com/gothinkster/realworld that demonstrates Drill4J's metrics collection capabilities for Java applications & tests.

Notifications You must be signed in to change notification settings

Drill4J/realworld-demo

Repository files navigation

Drill4J Demo

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

Drill4J services:

Prerequisites to run demo

  1. Docker

    • 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
      
  2. Java 8/1.8 or later

  3. Git

How to run

  1. Clone project

    git clone https://github.com/Drill4J/realworld-demo.git;
    cd realworld-demo
  2. Deploy Drill4J services:

    1. Navigate to /docker folder
    2. Launch script
    ./start-drill4j-services.sh
    1. Wait for the docker-compose to start all services
  3. Deploy Realworld App

    1. Make sure to be in the /docker folder
    2. Launch script
    ./start-realworld.sh
  4. Open the following link http://localhost:8095 to access Metabase

    1. Login using the credentials
        # email
        user@user.user
        # password 
        useruser1 
    
  5. Open Builds page to view available application versions.

    1. Click on individual build title (e.g. realworld:backend:0.1.0) to see metrics.
  6. Execute tests for realworld:backend:0.1.0 build

    1. Navigate back to repository root
    2. Execute script
        ./test.sh build1 
    
    1. Wait for the tests to complete (you will see the message in the terminal)
  7. Look at metrics for realworld:backend:0.1.0 again.

    • Notice how Drill4J collected coverage and grouped it for each distinct test
  8. Look at metrics for realworld:backend:0.2.0 build

    • Set "Baseline Build" filter value to realworld: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 with 0.2.0 version.
  9. Execute tests for realworld:backend:0.2.0 build

        ./test.sh build2
    
  10. Look at metrics for realworld:backend:0.2.0 again. You should see that:

    • coverage % increased
    • number of untested changes reduced

Teardown

  1. Navigate to docker folder
  2. Execute teardown.sh script

About

Demo of Drill4J integration for https://github.com/gothinkster/realworld that demonstrates Drill4J's metrics collection capabilities for Java applications & tests.

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •