Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus
  2.  
  3. def TestSuite = testRunner.getTestCase()
  4. def StepList = TestSuite.getTestStepList()
  5.  
  6. Failed = 0
  7. Total = 0
  8.  
  9. log.info "_____Start of Log_____"
  10.  
  11. // psuedo code
  12. // SuiteList.each
  13. // CaseList.each
  14.  
  15. StepList.each
  16. {
  17. if(it.metaClass.hasProperty(it,'assertionStatus')){
  18. Total = Total + 1
  19. def assertions = it.getAssertionList()
  20. assertions.each
  21. { assertion ->
  22. if(it.assertionStatus == AssertionStatus.FAILED)
  23. {
  24. assertion.getErrors().each
  25. { error ->
  26. log.error "${it.name}: [FAILED] ${error.getMessage()}"
  27. }
  28. Failed = Failed + 1
  29. }
  30. }
  31. }
  32. }
  33. log.info " Script Run: " + Total
  34. log.info " Scripts Failed: " + Failed
  35. log.info "_____End of Log_____"
  36.  
  37. 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*)
  38. 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*)
  39. Tue Oct 25 12:55:20 BST 2016:INFO: Script Run: 300
  40. Tue Oct 25 12:55:20 BST 2016:INFO: Scripts Failed: 205
  41. Tue Oct 25 12:55:20 BST 2016:INFO:_____End of Log_____
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement