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.
more accurate Success Rate calculation
I found that the Script Report (\userdata\config\reports\html\script_report.xsl) rounds up the Success Rate calculation which could result in a Success Rate of 100% even with failures and/or errors.
Here is the line with the calculation (script_report.xsl: line 138):
My script had 794 total steps with 1 failure and 1 error which results in a value of 99.74811... which is rounded up to 100%.
If you would like a better representation of your success rate, replace that with this line:
NOTE: You need to change the encapsulating double quotes with single quotes to get the format string to take.
Here is the line with the calculation (script_report.xsl: line 138):
select="count(($stepsCount - $failures - $errors) div $stepsCount * 100)" />
My script had 794 total steps with 1 failure and 1 error which results in a value of 99.74811... which is rounded up to 100%.
If you would like a better representation of your success rate, replace that with this line:
select='format-number((($stepsCount - $failures - $errors) div $stepsCount * 100), "#.00")' />
NOTE: You need to change the encapsulating double quotes with single quotes to get the format string to take.
Best Answer
-
The following files also use the XSLT round function which you may want to replace with the format-number function:
\userdata\config\reports\html\reconciled_report.xsl: line 134
\userdata\config\reports\html\suite_report.xsl: line 418