Hi all-
I've just published a plugin for anyone using Gradle, and wants to do the same things that the Ant and Maven dynaTrace integration are doing. Currently supported is setting metadata, start / stop recording and setting the JVM arguments for the Test task to start the dynaTrace Agent.
Also included is a 'helper' if you are using Spock Framework for testing. See my other thread, but dynaTrace currently doesn't support Spock unless you are annotating with @Test. This plugin helps you find the tests that are NOT annotated.
See the plugin / documentation here: https://github.com/Aon-eSolutions/gradle-dynaTrace
--John
Answer by Keith W. ·
Thanks for that - I've managed to build the plugin and I'm currently configuring the gradle task.
Just curious as to why this plugin requires an agent installed on the build machine? Presumably the build machine is the Jenkins slave the job is running on and this agent won't be getting called from dynaTrace?
Hi Keith-
It requires the agent because that's what's actually instrumenting your code. Since the JUnits are running wherever you kicked Gradle off, it requires it in the same place, so it can instrument your JUnit code. I believe this is the same requirement as the ANT task.
--John
Answer by Keith W. ·
I could do with some guidence on getting this plugin working...
Hi Keith-
I'm not sure exactly where you're running into issues, but the README.md should offer some basic guidance (assuming you know the basics of gradle). The main part is to add the plugin JAR to your buildscript dependencies. I'm sorry, but I don't have a public place to host this, so you'll have to clone the Repository and build it yourself. In our company, we have an internal Artifactory instance where we host things like this.
If you still have questions, there is a 'pluginTest.gradle' which is a working example. I didn't want to provide our server names and such, so you'll see project properties in there, which you can provide with -P. For example: gradle -PdynaTraceServer=http://mydynatrace.com/.
Hope this helps get you started!
--John
Answer by Andreas G. ·
Thanks John - thats great!!
We will make sure to also get this on a "consolidated" download page in our download section
JANUARY 15, 3:00 PM GMT / 10:00 AM ET