Hi Radim,
could you please provide me with a little test document that allows us to reproduce the behavior? The GUI InfoView output (or the output triggered by -V on command-line) would be helpful, too.
Thanks in advance, Christian
On Fri, Aug 18, 2017 at 10:49 AM, radim-havlicek@post.cz wrote:
Hello, I want to count failed reports in DB, it means where outcome value of report is "Failed".
declare namespace TestResults='urn:IEEE-1671:2009.04:TestResults'; declare namespace Common='urn:IEEE-1671:2010:Common';
let $DocumentNames := (db:list("ASC", "Report")) for $DocumentName in $DocumentNames let $Document := db:open('ASC',$DocumentName)
let $FailedTests := $Document/TestResults:TestResults/TestResults:ResultSet/TestResults:TestGroup/TestResults:TestGroup/TestResults:TestGroup/TestResults:TestGroup/TestResults:Test/TestResults:Outcome/data(@value) where $FailedTests="Failed" return count($FailedTests)
However, it counts all reports, no matter if the value is "Passed" or "Failed". If I change the end to: return $FailedTests, it displays both "Failed" and "Passed" values. If I change it to: where $FailedTests="Test", it displays correctly 0 reports. What am I doing wrong?
Thank you in advance for your reply.
Radim Havlicek