API Tests
This page walks you through Drill4J integration for Java-based API tests. It will enable you to use such features as Per Test Coverage and Test Recommendations
#
PrerequisitesThis page assumes you have Application Agent configured for application under test. For instructions see:
API tests launched with either Maven or Gradle
#
Configure Drill4J Plugin#
GradleAdd Drill4J CI/CD plugin to your Gradle build file:
Add general properties to your Gradle build file:
#
MavenAdd Drill4J CI/CD plugin to your Maven build file:
#
Launch TestsLaunch your tests with Gradle/Maven (e.g.
gradle test
,mvn test
).When running tests in your IDE, double-check that it's picking up the correct configuration file with the Drill4J test agent added (that will be
build.gradle
for Gradle,pom.xml
for Maven)To confirm test agent is working check tests log. There should be Drill4J ASCII logo followed by test agent version:
That’s it! Open the Metabase UI and confirm that the new test information is coming through. You should see the Test Launches on the Build Summary dashboard.
#
Disabling test agent for specific task#
GradleIf you want to disable Drill4J for specific test task you can set the following:
#
Maven🚧 UNDER CONSTRUCTION. TO BE COMPLETED SOON 🚧