Consider xquery-unit: http://code.google.com/p/xquery-unit/updates/list which has methods to build an ad-hoc xquery function call by adding import statements etc. You can then test the result using XPath or any string based method.
Damon From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Rojan K K Sent: Tuesday, March 08, 2011 2:47 AM To: general@developer.marklogic.com Subject: [MarkLogic Dev General] Xquery unit testing Hi, I would like to do unit testing for my xquery code using junit.Kindly advice how we can write junit test cases for individual methods in xquery. I could able to do a null check for entire xquery module by running that module using xcc connection and using junit.But i couldnt able to write test case for individual methods and would like to know how i can invoke individual xquery methods(Any java API available?). So Please advice me the best approch we can follow for xquery unit testing . Regards, Rojan
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general