18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Issues with junit report xmls
I'm trying out the JUnit report xmls generated by Sahi and have some issues :
1.)
I tried running junitreport ant task with the generated junit report xmls.
I get the following error :
line in TEST-xss1__25Jul2009__21_34_40.xml causing error :
line in TEST-xss2__25Jul2009__21_34_45.xml causing error :
Looks like some of the characters < , > , & etc need to be escaped.
Replacing < with < , > with > , & with & works for and I can see JUnitReport task succeeds.
2)
right now each test case is considered a test suite and each "check point" in the script is considered a test case.
It shows the number of lines in the code as number of test cases.
So even though I had only two test scripts, it shows up as 28 test cases.
3)
The package name in the JUnit html reports are the test case names.
Suppose I had xss1.sah and xss2.sah as the test cases in my Sahi test suite file,
I had packages as xss1 and xss2 and the classes as sah and sah.
Here is a screenshot of the JUnit HTML Report that should show what I'm seeing :
1.)
I tried running junitreport ant task with the generated junit report xmls.
I get the following error :
[junitreport] [Fatal Error] TEST-xss1__25Jul2009__21_34_40.xml:3:83: The reference to entity "cntry" must end with the ';' delimiter.
[junitreport] The file F:\users\hari\work\workspaces\galileo\sahi-security-bug-automation\results\junit\TEST-xss1__25Jul2009__21_34_40.xml is not a valid XML document. It is possibly corrupted.
[junitreport] [Fatal Error] TEST-xss2__25Jul2009__21_34_45.xml:11:71: The value of attribute "name" associated with an element type "testcase" must not contain the '<' character.
[junitreport] The file F:\users\hari\work\workspaces\galileo\sahi-security-bug-automation\results\junit\TEST-xss2__25Jul2009__21_34_45.xml is not a valid XML document. It is possibly corrupted.
line in TEST-xss1__25Jul2009__21_34_40.xml causing error :
<testcase name="_log("Navigating to " + "http://somesite.com:8180/app/login.jsp?lang=en&cntry=US&id=&command=&activeControl=%5C%22;javascript:onload(window.location=%27http://www.host.com/%27);%2F%2F" ,"info");"></testcase>
line in TEST-xss2__25Jul2009__21_34_45.xml causing error :
<testcase name="_setValue(_textbox("displayName"), "<script>alert(\"bugxss11\");</script>");"></testcase>
Looks like some of the characters < , > , & etc need to be escaped.
Replacing < with < , > with > , & with & works for and I can see JUnitReport task succeeds.
2)
right now each test case is considered a test suite and each "check point" in the script is considered a test case.
It shows the number of lines in the code as number of test cases.
So even though I had only two test scripts, it shows up as 28 test cases.
3)
The package name in the JUnit html reports are the test case names.
Suppose I had xss1.sah and xss2.sah as the test cases in my Sahi test suite file,
I had packages as xss1 and xss2 and the classes as sah and sah.
Here is a screenshot of the JUnit HTML Report that should show what I'm seeing :
http://yfrog.com/9esahireportj
Tagged:
Comments