Forum Discussion
Nastya_Khovrina
8 years agoSmartBear Alumni (Retired)
Hi Namrata,
Thank you for your post. The TestCase status can be Passed, Failed, Unknown and Cancelled. If you want to show another status, you can use the Groovy Test step and write a specific message to the log using this command:
log.info("Your message")
For example, add this script to the TestSuite TearDown script:
def count = 0 def countFailed = 0 for ( testCaseResult in runner.results ) { testCaseName = testCaseResult.getTestCase().name count = count + 1 if( testCaseResult.getStatus().toString() == 'FAILED' ) { countFailed = countFailed +1 log.info "$testCaseName has failed" } } def percentage = ( countFailed / count ) * 100 log.info("Percentage = " + percentage) if(percentage > 50) { log.info("Partially Succeed.") }
Related Content
- 6 years ago
- 5 years ago
- 4 years ago
Recent Discussions
- 3 hours ago
- 17 days ago