Forum Discussion

RohanPalkar's avatar
RohanPalkar
Occasional Contributor
13 years ago

Adding Item to Report Metric

Hi,

I have a test Suite property called 'Validation_Result' which is set using groovy scripts when the test case is run.

In my customized report I am using the following -
<dataSourceExpression>$P{TestSuiteMetrics}</dataSourceExpression>
<subreportExpression class="java.lang.String">"subreport:MetricsReport"</subreportExpression>

Now I want to add this parameter 'Validation_Result' to the above Metric Parameters which shows the assertion count, failed assertion count etc. so that it could be displayed as following -

Assertion count = xx
Failed Assertion count = yy
Validation Result = zz

I used the following in the report script of the test suite, but I am not sure if it's correct -
report.addMetric( "Data Validation Result", testSuite.getProperty( "Validation_Result"))

I thought of adding this parameter to the reporting parameter, but again as I could see it, it would be displayed separately & not as part of the metric statistics...

Could anyone please guide me as to how could it be achieved.

Thanks,
Rohan Palkar
No RepliesBe the first to reply