MarkLogic Unit Test

What is MarkLogic Unit Test

MarkLogic Unit Test is a testing component that was originally part of the Roxy project. This component enables you to build unit tests that are written in and can test against both XQuery and Server-side JavaScript. Unit testing provides several benefits:

  • Good tests give you confidence that your code does what you think it does
  • Tests show other developers how you expect your code will be used.
  • Testing ensures that new code does not reintroduce old bugs
  • Unit tests allow you to easily automate the tedious job of careful testing

marklogic-unit-test includes the original Roxy unit test framework for MarkLogic and provides a few new features:

  1. A REST endpoint for listing and running unit tests
  2. A small Java library for integrating MarkLogic unit tests into existing test frameworks like JUnit
  3. The ability to depend on this module as a true third-party dependency via ml-gradle

How Do I get Started?

To try this out locally, check out the ml-gradle example project. You can use that project’s build.gradle file as an example of how to use marklogic-unit-test in your own project.

How Do I Ask a Question or Send Feedback?

Have a question?

Someone else might have already asked.

  1. Look at our Stack Overflow Questions
  2. Look at our GitHub Issues
  3. Still can’t find an answer? Use the #marklogic tag on StackOverflow to ask us.

Found a bug? Have a comment?

File an issue on Github and we will see it.