xray is a framework for writing XQuery unit tests on MarkLogic Server. Test cases are written as standard XQuery functions like this:
declare %test:case function string-equality-example ()
{
let $foo := "foo"
return assert:equal($foo, "foo")
};
Getting Started
- Clone/copy/symlink xray into the root directory of your project e.g.
git clone git://github.com/robwhitby/xray.git
or
git submodule add git://github.com/robwhitby/xray.git
- Create an HTTP app server pointing to the root directory of your project.
- Check all is well at
http://server:port/xray/
- Write some tests..
More Information
See the readme file for detailed information about writing and running tests. If you have any questions or suggestions I'd love to hear them, see xray issues on GitHub.
Thanks,
Rob
@robwhitby