atom feed1 message in com.marklogic.developer.general[MarkLogic Dev General] XRay Unit Tes...
FromSent OnAttachments
Ron HitchensJan 1, 2018 8:01 pm 
Subject:[MarkLogic Dev General] XRay Unit Test Plugin For Gradle
From:Ron Hitchens (ro@ronsoft.com)
Date:Jan 1, 2018 8:01:37 pm
List:com.marklogic.developer.general

Do you use XRay [1] to write unit tests for your XQuery code? If you don’t, you probably should.

Do you use Gradle [2] to run your builds? If not, you probably should do.

Would you like to run your XRay tests as an automated task in Gradle, just like JUnit tests? Of course you would.

Annoyed that you can’t easily do that? Of course you are.

Well, despair no longer. I’ve written a simple and easy Gradle plugin that will run your XRay tests from Gradle along with any other tests that are run as part of the “test” Gradle task [3]. It will even output xUnit result files (the format used by JUnit and others) so that test results will appear in your CI build tool, such as Jenkins or Team City.

See [3] below for details of how to import the plugin (it’s basically a one-liner). You will also need to have XRay in scope on an MarkLogic appserver ready to be invoked. If you’re already using XRay then you probably have that set up already. See [1] for details of setting up and configuring XRay. See [3] for how to configure the plugin to set the XRay URL and other parameters.

Please report any problems, bugs, feedback, etc as an Issue at [3].

[1] https://github.com/robwhitby/xray [2] https://gradle.org/ [3] https://github.com/overstory/xray-gradle-plugin