Forum Discussion

mpartyka's avatar
mpartyka
Contributor
8 years ago

getAssertionStatus = null?

 

I have a groovy test step that is trying to determine if a previous test step (type = Assertion) was successful.  


          def assert_status_token = testRunner.testCase.getTestStepByName("Assertion").getAssertionStatus().toString()

 

           if (assert_status_token == 'VALID'){
            }
            else
            {
            }

 

If the assertion passes in the test step referenced, when running locally on my laptop the assert_status_token == 'VALID'.   When I run this in TeamCity (which runs the test using TestRunner from command line) on the exact same data, the assert_status_token = 'null'.

 

If the assertion fails, the assert_status_token = 'FAILED' both locally and in Team City.

 

The failures occur on the exact same records either locally or in TeamCity (running TestRunner from command line), but I'm not comfortable with the null response.

 

Any ideas what would cause the assert_status_token to return null ?   

 

Thanks to any & all for ideas!

 

 

No RepliesBe the first to reply