diff --git a/.gitignore b/.gitignore index f2d7acc8c..59459e8c3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.bak Thumbs.db .DS_Store -ns/tundra/support/test +ns/tundra/support/test/* +!ns/tundra/support/test/node.idf +!ns/tundra/support/test/execute diff --git a/code/jars/Tundra.jar b/code/jars/Tundra.jar index c4e2bff93..9098f0b7e 100644 Binary files a/code/jars/Tundra.jar and b/code/jars/Tundra.jar differ diff --git a/ns/tundra/support/test/execute/java.frag b/ns/tundra/support/test/execute/java.frag new file mode 100644 index 000000000..828c0a33c --- /dev/null +++ b/ns/tundra/support/test/execute/java.frag @@ -0,0 +1,13 @@ + + + + execute + true + SURhdGFDdXJzb3IgY3Vyc29yID0gcGlwZWxpbmUuZ2V0Q3Vyc29yKCk7Cgp0cnkgewogICAgU3Ry +aW5nIHBhY2thZ2VOYW1lID0gSURhdGFIZWxwZXIuZ2V0KGN1cnNvciwgIiRwYWNrYWdlIiwgU3Ry +aW5nLmNsYXNzLCB0cnVlKTsKICAgIGludCBjb25jdXJyZW5jeSA9IElEYXRhSGVscGVyLmdldE9y +RGVmYXVsdChjdXJzb3IsICIkY29uY3VycmVuY3kiLCBJbnRlZ2VyLmNsYXNzLCAxKTsKICAgIElE +YXRhSGVscGVyLnB1dChjdXJzb3IsICIkcmVzdWx0IiwgVGVzdEhlbHBlci5leGVjdXRlKFBhY2th +Z2VIZWxwZXIuZ2V0UGFja2FnZShwYWNrYWdlTmFtZSksIGNvbmN1cnJlbmN5KSk7Cn0gZmluYWxs +eSB7CiAgICBjdXJzb3IuZGVzdHJveSgpOwp9 + diff --git a/ns/tundra/support/test/execute/node.ndf b/ns/tundra/support/test/execute/node.ndf new file mode 100644 index 000000000..63dc0e453 --- /dev/null +++ b/ns/tundra/support/test/execute/node.ndf @@ -0,0 +1,428 @@ + + + + java + unknown + java 3.5 + + + record + false + record + 0 + true + false + false + + + record + + + + false + false + + false + $package + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + string + + + + false + false + false + + + record + + + + false + false + + false + $concurrency + string + 0 + true + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + positiveInteger + + + + true + false + false + + + true + + + record + false + record + 0 + true + false + false + + + record + + + false + false + + false + $result + record + 0 + true + true + false + false + + + record + + + + false + false + + false + package + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + string + + + + false + false + false + + + record + + + + false + false + + false + passed? + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + boolean + + + + false + false + false + + + record + + + false + false + + false + counts + record + 0 + true + false + false + + + record + + + + false + false + + false + total + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + nonNegativeInteger + + + + false + false + false + + + record + + + + false + false + + false + passed + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + nonNegativeInteger + + + + false + false + false + + + record + + + + false + false + + false + failed + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + nonNegativeInteger + + + + false + false + false + + + true + true + + + record + + + false + false + + false + cases + record + 1 + true + true + false + false + false + + + record + + + + false + false + + false + description + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + string + + + + false + false + false + + + record + + + + false + false + + false + passed? + string + 0 + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + boolean + + + + false + false + false + + + record + + + + false + false + + false + message + string + 0 + true + + 1 + reference + dtVersion2 + + + http://www.w3.org/2001/XMLSchema + string + + + + true + false + false + + + true + true + + + true + true + + + true + + + ### tundra.support.test:execute + +Runs all *test*:should* services in the given package, returning the +test results, where a test case passes if no exceptions are thrown. + +Supports optional :setup and :teardown sibling services, which are +invoked before and after each test case service respectively. + +#### Inputs: + +* $package is the name of the package which contains the test cases + to be executed. +* $concurrency is an optional number of threads to use when + executing the test cases. Defaults to 1. + +#### Outputs: + +* $result is a document containing the test results from executing + all the *test*:should* services in the given $package. + * package is the name of package the test results relate to. + * passed? is a boolean indicating if all test cases executed + passed. + * counts is a document containing the test result counts. + * total is the total number of test case services executed. + * passed is the number of test case services which passed (did + not throw an exception). + * failed is the number of test case services which failed (threw + an exception). + * cases is a list of the test case services which were executed. + * description is the fully-qualified name of the test case + service. + * passed? is a boolean indicating if the test case service passed + (did not throw an exception). + * message is an optional description returned if the test case + service failed, which describes why the test case failed. + + no + no + no + 15 + 1 + html + off + no + $null + no + 0 + 0 + default + default + 0 + + + + 0 + false + false + true + + 1 + + true + false + diff --git a/ns/tundra/support/test/node.idf b/ns/tundra/support/test/node.idf new file mode 100644 index 000000000..78ebbe922 --- /dev/null +++ b/ns/tundra/support/test/node.idf @@ -0,0 +1,17 @@ + + + + interface + tundra.support.test + false + true + + + + + + permafrost.tundra.data.IDataHelper + permafrost.tundra.server.PackageHelper + permafrost.tundra.server.TestHelper + +