Service Virtualization

  • 1.  Compare xml in run time

    Posted Mar 01, 2017 08:07 AM

    Hi All,

     

    Good Evening,

     

    Can any one help me to compare 2 xml files automatically using devtest workstation.

     

    Example:-

    Need to execute webservice in different enviornments and have to compare responses without/Less manual effort.

     

    Regards,

    Neelkamal



  • 2.  Re: Compare xml in run time
    Best Answer

    Posted Mar 01, 2017 08:30 AM

    You might want to research the Graphical Side-by-Side comparison assertion.  

    A discussion of how the assertion works is found at this link:

    Graphical XML Side-by-Side Comparison - DevTest Solutions - 10.0 - CA Technologies Documentation  

     

    CLICK the Step, CLICK Assertions, add an assertion and look under XML assertions.



  • 3.  Re: Compare xml in run time

    Posted Mar 01, 2017 04:18 PM

    To further drill down on your original question, you need to set up a test case that calls each of the two services.

     

    The response (or desired content) from each service can be "filtered" into a DevTest property.  The Filter is applied in the step where the WS call is made.  

     

    To simplify the model, a third step (Do Nothing) can be added which contains the Graphical Side-by-Side Assertion. The inputs to the Assertion will be the property names that you filtered in your webservice calls.  For sake of example, the fl_WSResponse1 property might be filtered in the step WS Call to Env 1 and the fl_WSResponse2 property might be filtered in the WS Call to Env 2 step.  The Assertion uses property notation {{ }} to reference the two XMLs.  

    Use the Settings tab to configure the desired behavior with regard to how the comparison should work for your specific implementation.