Service Virtualization

  • 1.  How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Posted Jun 04, 2018 09:30 AM
      |   view attached

    Hi,

     

    I have used "Graphical XML Side-by-Side Comparison" Assertion, to verify what is the difference between 2 XMLs.

    I have stored 1 XML in excel file and referring that in the left panel of assertion window and having the property {{LASTRESPONSE}} in the right panel for comparison. The value in the property {{LASTRESPONSE}} is getting referred as a  single line. So the difference is shown in single line itself so unable to actually find the exact difference.

    If the {{LASTRESPONSE}} is formatted properly then difference in each tag can be found easily.

     

    How to format the {{LASTRESPONSE}}? Pls clarify.

    refer the attachment for XML difference shown.



  • 2.  Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion
    Best Answer

    Broadcom Employee
    Posted Jun 04, 2018 09:49 AM

    It looks like the step response value is truncated , and so the assertion is failing to find the value present in the response. 

    Add the below property in workstation.vmoptions file and restart Workstation, this will prevent long messages from being truncated.

    -Dtestexec.lite.longMsgLen=65535



  • 3.  Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Posted Jun 07, 2018 07:19 AM

    Hi Shiney,

     

    I tried the same but still the same issue occurs. Any other solution?



  • 4.  Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Broadcom Employee
    Posted Jun 04, 2018 09:56 AM

    You can set the property lisa.vse.response.xml.prettyprint=true and that should format the response.

    DevTest Property File (lisa.properties) - DevTest Solutions - 10.3 - CA Technologies Documentation 



  • 5.  Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Posted Jun 07, 2018 07:19 AM

    Hi Prema,

    I added the property as mentioned, but still the response is in single line only.



  • 6.  RE: Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Posted May 25, 2022 02:07 PM
    Hi @Premalatha Gadde , I have added the above mentioned property in lisa.properties file . But still the response is in single line .
    Could you please advice on this . ​​


  • 7.  RE: Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Posted May 26, 2022 02:05 AM
    Edited by Vaibhav Jain May 26, 2022 02:07 AM
    Hi Manisha,

    Could you please explain the ask again, what exactly is the issue - comparison output or its view? As the comparison could be manipulated using below options :


    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 8.  RE: Re: How to format LASTRESPONSE for Graphical XML Side-by-Side Comparison Assertion

    Posted May 27, 2022 06:00 AM
    HI @Vaibhav Jain ,
    I need to perform a xml validation​. 
    I am sending one xml as input which is in proper format .  Then I need to fetch the xml from db and do the xml comparison . 
    But the issue is, the xml which I am fetching from DB is not in proper format . It is in single line .
    My question is : How we can format this fetched xml(which is in single line) and perform the graphical xml side by side comparison .