Forum Discussion

ianhong's avatar
ianhong
Visitor
7 years ago

How to make Maven build still success when test step succeed after re-execution?

My testcase has Conditional Goto, it checks a field in response. If it is 'Pending', testrunner will go back 2 steps, delay a few seconds and retry. So the assertion of first response will fail but it will succeed in second response (response of the retry). In this case when 'failTestCaseOnErrors' is set to false and running this test case through SOAP UI GUI, this test step will show as red first time but show as green second time. So the final result of the test step is pass becuase the green colour tells you straight away.

 

This becomes a problem when running it on Jenkins. I run this using soapui-maven-plugin. Everytime when Conditional Goto failed first time and succeed second time, Jenkins still mark the build as 'Failure'.

 

If I set soapui-maven-plugin's 'testFailIgnore' property to 'true', then Maven build will always be Success which ignores all the failures even if it's not caused by retry of Conditional Goto.Obviously this is not what I want.

 

So how can I make Maven build still Success even if some test steps failed 1st time but succeeded 2nd time? Can Maven only use the latest result (OK or Failed) of each test step?

No RepliesBe the first to reply