Forum Discussion

kber's avatar
kber
Occasional Contributor
8 years ago

How to make SoapUi NG Pro - jUnit Error?

Hi

 

I'm having difficulties the API I'm working on and would like my entire test to abort with an error, if the API is down.

 

When using TestRunner I have only managed to receive a 'failure', which isn't good enough.

 

Please see attached

  • You could try writing a groovy script that checks for the failure condition and if its met, use testRunner.fail(). 

     

    Here's an example.

  • groovyguy's avatar
    groovyguy
    Community Hero

    There is an option you can set via Test Case where you can make the entire test bed fail if one test step fails. The setting is called "Abord test if an error occurs" and you would have to set it per test case. 

    • kber's avatar
      kber
      Occasional Contributor

      Hi msiadak

       

      Thanks for the heads up.

       

      I was aware of this option and no matter whether I ticket it off or on the behavior is still the same.

      Same thing goes for the 'Fail Test Case on Error' unfortunately.

       

      In the JUnit html report it still shows as 'failure' instead of 'error' and the TestRunner doesn't quit.

       

      Do you know if there are similar settings elsewhere?

       

      Br

       

      • groovyguy's avatar
        groovyguy
        Community Hero

        You could try writing a groovy script that checks for the failure condition and if its met, use testRunner.fail(). 

         

        Here's an example.