Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Testing for Marklogic

We are looking for a framework to test our MarkLogic XQuery code.

We can see MarkLogic/XQunit is a good framework, but it does not have code coverage feature.

What is the best framework to write unit test cases for MarkLogic XQuery?

like image 933
Mazher Hassan Avatar asked Mar 31 '15 13:03

Mazher Hassan


1 Answers

Two unit test frameworks I've seen used in practice are XRay and Roxy Unit Test (note that Roxy Unit Test is part of a larger project, consisting of the Roxy Deployer, MVC structure, and Unit Test; the Unit Test feature will be easiest to use if you're also using the Deployer). Roxy can test XQuery and Server-side JavaScript code.

I'm not aware of any tool that provides code coverage at this time.

Edit: Rob Rudin has made the Roxy Unit Test framework more accessible to gradle projects: https://github.com/marklogic-community/ml-unit-test.

Edit 2: ml-unit-test now offers an experimental code-coverage feature

like image 75
Dave Cassel Avatar answered Sep 21 '22 07:09

Dave Cassel