PREFIX st: PREFIX rdf: PREFIX owl: PREFIX dcterms: PREFIX dc: PREFIX fun: PREFIX rdfs: PREFIX skos: PREFIX obo: PREFIX foaf: PREFIX iter: PREFIX fun: TEMPLATE ( ?testsuites ) { TEMPLATE ( "SAREF pipeline report", "static" , false ). """

SAREF Pipeline report { fun:XPath( ?testsuites, "/testsuites/@name") }

There are { fun:XPath( ?testsuites, "/testsuites/@errors") } errors and { fun:XPath( ?testsuites, "/testsuites/@failures") } warnings

""" TEMPLATE { "
" BOX { """

{ fun:markdownToHTML( fun:XPath( ?testsuite , "/testsuite/@name" ) ) }

There are { fun:XPath( ?testsuite, "/testsuite/@errors") } errors and { fun:XPath( ?testsuite, "/testsuite/@failures") } warnings""" TEMPLATE { """

{ fun:markdownToHTML( fun:XPath(?testcase, "/testcase/@name") ) }

{ TEMPLATE { fun:markdownToHTML( "Failure: { fun:XPath( ?failure, "/failure/@type" )} - {fun:XPath( ?failure, "/failure/@message" )}" ) } WHERE { BIND( fun:XPath(?testcase, "/testcase/failure") AS ?failure ) } . } { TEMPLATE { fun:markdownToHTML( "Error: { fun:XPath( ?error, "/error/@type" )} - {fun:XPath( ?error, "/error/@message" )}" ) } WHERE { BIND( fun:XPath(?testcase, "/testcase/error") AS ?error ) } . } { TEMPLATE { "
See error details:
{ ?output }
" } WHERE { BIND( fun:XPath(?testcase, "/testcase/system-err" ) AS ?output ) } . } { TEMPLATE { "
See output details:
{ ?output }
" } WHERE { BIND( fun:XPath(?testcase, "/testcase/system-out" ) AS ?output ) } . }
""" } ITERATOR iter:XPath( ?testsuite , "/testsuite/testcase") AS ?testcase ?pos WHERE { VALUES ( ?status ?class ?priority ) { ("success" "alert-success" 1) ("warning" "alert-warning" 1) ("failure" "alert-warning" 1) ("error" "alert-danger" 2 ) ("unknown" "alert-dark" 1 ) } FILTER( str(fun:XPath (?testcase , "/testcase/@status" )) = ?status ) } ORDER BY ?pos . } "
\n" } ITERATOR iter:XPath( ?testsuites , "/testsuites/testsuite") AS ?testsuite . """
""" TEMPLATE ( "static", false ) . } WHERE { }