Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus
- def TestSuite = testRunner.getTestCase()
- def StepList = TestSuite.getTestStepList()
- Failed = 0
- Total = 0
- log.info "_____Start of Log_____"
- // psuedo code
- // SuiteList.each
- // CaseList.each
- StepList.each
- {
- if(it.metaClass.hasProperty(it,'assertionStatus')){
- Total = Total + 1
- def assertions = it.getAssertionList()
- assertions.each
- { assertion ->
- if(it.assertionStatus == AssertionStatus.FAILED)
- {
- assertion.getErrors().each
- { error ->
- log.error "${it.name}: [FAILED] ${error.getMessage()}"
- }
- Failed = Failed + 1
- }
- }
- }
- }
- log.info " Script Run: " + Total
- log.info " Scripts Failed: " + Failed
- log.info "_____End of Log_____"
- Tue Oct 25 12:55:20 BST 2016:ERROR:TestStep_0299: [FAILED] Expected Result: 49.401 or 52.002 or 54.602 Actual Result: 41.60164055168. Expression: node.toString().matches((49.401|52.002|54.602)d*)
- Tue Oct 25 12:55:20 BST 2016:ERROR:TestStep_0300: [FAILED] Expected Result: 61.752 or 65.002 or 68.252 Actual Result: 52.0020506896. Expression: node.toString().matches((61.752|65.002|68.252)d*)
- Tue Oct 25 12:55:20 BST 2016:INFO: Script Run: 300
- Tue Oct 25 12:55:20 BST 2016:INFO: Scripts Failed: 205
- Tue Oct 25 12:55:20 BST 2016:INFO:_____End of Log_____
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement