xray is a framework for testing XQuery code on MarkLogic Server. It makes it super easy to write tests as standard XQuery functions. Check out the GitHub repository for more details.