Hi,

Around version 7.8 there was a function that allowed unit tests to be invoked from XQuery:

unit:test-uris($uris as xs:string*) as element(testsuites)

Later this was removed, but ability to run updating tests was added. Which was great.

I wonder how easy it would be, using the jobs module, to implement a function as below?

jobs:test-uris($uris as xs:string*, $options as map(xs:string, xs:string)) as xs:string

Asynchronously runs all functions in the specified modules that have unit annotations.A test report
 is generated and  optionally cached, which resembles the format returned by other xUnit testing
frameworks, such as the Maven Surefire Plugin.

returns a job id

/Andy