Service Virtualization

 View Only
  • 1.  Failed the step if the multiple assertion are included in a single step

    Posted Apr 03, 2018 11:54 AM

    How to process multiple inbuilt assertion in a single step and failed the step and process the flow so that we can find which assertion got failed.

    Main Requirement :-

    Step should show as fail and show which assertion got failed.

    is there any step called as LISA_NEXT_STEP



  • 2.  Re: Failed the step if the multiple assertion are included in a single step
    Best Answer

    Posted Apr 10, 2018 06:01 AM

    I can see two ways that you can accomplish this:

     

    For every assertion you can set the next step (either for fail or pass), as here

    Next Step Selection for Assertion

     

    The other way in which you can achieve this is to use a scripted assertion and set a property using testExec.setStateValue that contains the desired information.



  • 3.  Re: Failed the step if the multiple assertion are included in a single step

    Posted Apr 11, 2018 02:29 PM

    Thanks for the reply but i want to use native assertions not the scripted assertions.



  • 4.  Re: Failed the step if the multiple assertion are included in a single step

    Posted Apr 12, 2018 03:31 AM

    For all the assertion select If Fail then "Generate Error"  from drop down instead of selecting "Fail the Test". "Generate Error" - This will genearate an error if assertion fails in Events tab of ITR and proceed to the next assertions. So in thi smanner we can see what all assertions failed. Try this and let me know.



  • 5.  Re: Failed the step if the multiple assertion are included in a single step

    Posted Apr 12, 2018 05:53 AM

    That is for ITR perspective we are not storing the assertions and validating after all steps get executed. 

    i want to store all the assertion result somehow and then compare it. 

    The given reply is already implemented 



  • 6.  Re: Failed the step if the multiple assertion are included in a single step

    Posted Apr 25, 2018 07:32 AM

    Use the filter "Store step response".

    What it does is (as the name suggests), stores the response of the step.

     

    So whenever your step fails it stores the exact reason of why it failed(even if the in-built assertion failed).

     

    Please try and let me know.

     

    Thanks