I created a custom html report containing 2 tests and the code goes like this:
Test Items:
Code: Select all
<table border=0 cellspacing=0 cellpadding=0 >
<tr><td nowrap>Test name:</td><td> </td><td nowrap><b>%TestName%</b></td></tr>
<tr><td nowrap>Test type:</td><td> </td><td nowrap>%TestMethod%</td></tr>
<tr><td nowrap>Last Test Time</td><td> </td><td nowrap>%LastTestTime%</td></tr>
<tr><td nowrap>Status was</td><td> </td><td nowrap><b>%LastSimpleStatus%</b></td></tr>
<tr><td nowrap>Status Duration</td><td> </td><td nowrap>%CurrentStatusDuration%</td></tr>
<tr><td nowrap>Since</td><td> </td><td nowrap>%StatusChangedTime%</td></tr>
<tr><td nowrap>Last Reply</td><td> </td><td nowrap>%LastReply%</td></tr>
<tr><td nowrap>Interval</td><td> </td><td nowrap>%Interval% </td></tr>
<tr><td nowrap><u>Global Info (this test):</u></td></tr>
<tr><td nowrap colspan=3>
<table border=0 cellspacing=0 cellpadding=0 >
<tr><td nowrap>Total tests</td><td> </td><td nowrap align="right">%TotalTests%</td></tr>
<tr><td nowrap>Good count / (ratio)</td><td></td><td nowrap align="right" >%PassedCnt%</td><td> </td><td nowrap align="right"> ( %AliveRatio% )</td></tr>
<tr><td nowrap>Bad count / (ratio)</td><td></td><td nowrap align="right">%FailedCnt%</td><td> </td><td nowrap align="right"> ( %DeadRatio% )</td></tr>
</table></td></tr>
<tr><td nowrap colspan=3><hr></td></tr>
</table>
Code: Select all
<table border=0 cellspacing=0 cellpadding=0>
<tr><td nowrap ><u>Global Info (All tests):</u></td></tr>
<tr><td nowrap>Good count (ratio) </td><td> </td><td nowrap align="right">%FolderTotal_PassedTests% </td><td nowrap align="right">( %FolderAverage_AliveRatio% % )</td></tr>
<tr><td nowrap>Bad count (ratio) </td><td> </td><td nowrap align="right">%FolderTotal_FailedTests% </td><td nowrap align="right">( %FolderAverage_DeadRatio% % )</td></tr>
</table>
the first test gives me total 1442 tests, good 1416 (98.20%), bad 26 (1.80%)
the second test, total: 1177, good 1163 (98.81%) , bad 14 (1.19%)
If you calculate these numbers, they all work..
Total is 1142+1177=2619 tests.
but for the folder results...
good count: 2579 (97.34%)
bad count: 40 (2.66%)
2579+40=2619 tests (same amount)
2579/2619 gives me 98.472% for good
40/2619 gives me 1.527% for bad
Then I thought... the macro is named %FolderAverage_AliveRatio%, so if I calculate the average, (98.20+98.81)/2 gives me 98.505%
How come I get these results?
I should expect to get either 98.47%(real) ou 98.51%(average) right?
Or maybe I am just blindly using the wrong macro...
Thank you for your time.