views:

207

answers:

2

I've been working with a document repository using XQuery (via Java and .NET interfaces) and was wondering if anyone has any recommendations for unit testing XQuery modules?

A: 

Here is a quick DIY type solution for this problem: Poor man's unit testing with XQuery (dead link).

This approach seems to have been embraced and extended for the tests of the xprocxq project.

Other tools exist, for example XTC.

Oliver Hallam
Blog is gone, link is broken
mbrevoort
Have updated answer to reflect this
Oliver Hallam
A: 

This link may spruce your development. This is just an idea but you can develope and enhance more on this with various unit-test case design ideas.

since Xml is a king in meta-data world its quite easy to design and run.

  1. design a Test-Case Xml by having all details capture

    1. test-data ( input & expected result )
    2. test-case id
    3. test-case local methods
  2. invoke dynamically based on the details.

functions

sample test script

results

kadalamittai