Service Virtualization

Expand all | Collapse all

How to use the Ensure Result Equals Json Assertion?

  • 1.  How to use the Ensure Result Equals Json Assertion?

    Posted Mar 14, 2019 07:24 AM

    How to use the Ensure Result Equals Json Assertion?

     

    I have tried using this in my design but i found some difficulties.

       1. Is it mandatory to use Load expected JSON? Actually i tried using from property option and gave the JSON path value and result of particular key value on the Expected value section. It is working but when i close the test cases reopen the test case , From property option getting removed and from content is appearing.

    2. IF i chose from content option, how the DevTest will know what is the expected response if i do not give any response as i have used property earlier?

     

    Please help me to know what was happened and how to resolve this?

     

    Thanks in Advance.

     

    Saikiran Garapati



  • 2.  Re: How to use the Ensure Result Equals Json Assertion?

    Broadcom Employee
    Posted Mar 19, 2019 05:11 PM

    What version of DevTest are you using?



  • 3.  Re: How to use the Ensure Result Equals Json Assertion?
    Best Answer

    Broadcom Employee
    Posted Mar 29, 2019 12:37 PM

    Sai,  run the test in the ITR,  and in the properties tab,  using the ICON as displayed  you can export all the values of the properties from runtime to design time. 

     

    Now go back to your Json step and you can add Xpath Assertions or  Filters.  

     



  • 4.  Re: How to use the Ensure Result Equals Json Assertion?

    Broadcom Employee
    Posted Apr 04, 2019 05:07 PM

    Thanks Shiney!



  • 5.  Re: How to use the Ensure Result Equals Json Assertion?

    Posted Apr 26, 2019 07:18 AM

    Thanks Shiney! Sorry for late reply