Setup Java Autotest Agent
This page describes how to setup Autotest Agent to collect metrics for automated API and E2E tests written in Java / other JVM language.
Supported tehcnologies#
While Drill4J provides plugins both for Maven and Gradle, for Autotest Agent to work it has to also support both test runner and transport. Why: refer to Data Collection section for the detailed explanation.
Supported testing frameworks / runners#
- TestNG
- JUnit
- JMeter
- Spock
- Cucumber
Support quality for future versions may vary. Good thing is it's either going to work or not. Please make sure to report issue if you encounter problems with the listed framework/runner.
Example configuration#
We provide plugins for both Maven and Gradle.
First step is to add com.epam.drill.agent.runner plugin - it will download autotest agent and launch it accordingly with configuration (see bellow)
Maven config#
Add the following lines to pom.xml configuration file in test project.
Remember to enter the appropriate values for agentId (or groupId, if using groups), adminPort, adminHost.
Gradle config#
Add the following lines to build.gradle configuration file in test project.
Remember to enter the appropriate values for agentId (or groupId, if using groups), adminPort, adminHost.
Troubleshooting#
Issue - failed to locate/download Autotest Agent#
Tests launch fails with error "Failed to locate or download autotest agent zip file. Reason: connection refused"
Most likely tests are launched in environment that is behind VPN / proxy, where default repository is unavailable.
Solution: either configure VPN/proxy to allow connection to GitHub or supply Autotest Agent directly:
Make sure
com.epam.drill.agent.runneris not lower than0.3.4Download platform-appropriate release from https://github.com/Drill4J/autotest-agent/releases (e.g.
agent-linuxX64-0.22.4.zip)Add either
directLocalPathToZipordirectUrlToZipto the root level of thedrillsection.When both are present
directLocalPathToZiptakes precedence.
See changes to example configs below