Hi,
Thanks for the requirements, I see that you want to run the report at project level and that you have quite a large number of TestSuites / TestCases. Just to get the ball rolling I have created a really simple CSV report script that can be pasted into the TearDown Script tab at project level:
log.info "TestSuite Name,TestSuite Status,TestCase Name,TestCase Status,Error Messages(s)"
for ( testSuiteResult in runner.results ){
for ( testCaseResult in testSuiteResult.results )
{
def row=""
row=testCaseResult.testCase.name + ","+testCaseResult.status.toString()+","
for ( testStepResult in testCaseResult.getResults() )
{
row+=testStepResult.testStep.name +","+ testStepResult.status.toString()+","
testStepResult.messages.each() { message -> row+=message
}
}
log.info row
}
}
In produces results like:
Fri Sep 16 15:05:58 BST 2016:INFO:TestSuite Name,TestSuite Status,TestCase Name,TestCase Status,Error Messages(s)
Fri Sep 16 15:05:58 BST 2016:INFO:TestCase,FAILED,REST Request,FAILED,org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
Fri Sep 16 15:05:58 BST 2016:INFO:TestCase 1,FAILED,REST Request To Update 1,FAILED,org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
Is this the type of data you're looking for?
Next steps could be to:
- Instead produce HTML output - I have some ideas on this.
- Write the output to a file - this should be easy
Note this is an alternative direction to nmrao s script, let me know if it doesn't suite your need. I am interested in developing a more self contained / integrated approach, possibly leading to a simple plugin.
Let me know your thoughts,
Thanks,
Rupert