XRay Gradle Plugin

Necessity is the mother of invention.  We at OverStory had the necessity of running XRay XQuery unit tests on MarkLogic from within a Gradle build.  But we were mildly surprised to find there was no easy way to do that, so we invented an XRay plugin for Gradle.

This plugin is open source and has been published to the public Gradle repository for anyone to freely use in their Gradle builds.

From the README:

This project is a plugin for Gradle that will run XRay tests on MarkLogic (or any XQuery platform where the tests can be invoked by an HTTP GET call to a URL).

Using the XRay Plugin

To use this plugin with Gradle, all you need to do is reference it in your build.gradle file, in a plugins block, like this:

plugins {
	id: 'uk.co.overstory.xray' version '1.0.1'

If you already have a plugins block, just add the above reference to it. Check the Gradle.org plugins page to find the latest version number of the plugin.

What It Does

What this plugin does:

  • It applies the java plugin if not already applied. That plugin provides the compile/build lifecycle tasks.
  • This plugin creates the 'xray' task and makes 'test' depend on it. That causes the XRay tests to be run before the 'test' task.

This plugin accepts several configuration parameters, ... [See project page for more details]