The two unit test frameworks I've seen in practice are XRay and the Roxy Unit Test (note that the Roxy unit test is part of a larger project consisting of Roxy Deployer, an MVC structure, and Unit Test; the unit test function will be easiest to use if you are also using Deployer). Roxy can test XQuery and server-side JavaScript code.
I do not know any tool that provides code coverage at this time.
Dave cassel
source share