Forum Discussion

gaveeee's avatar
gaveeee
Occasional Contributor
8 years ago

Using a XML-File with XML-Response in TestCase as input to validate other response

Hello,

 

I've started using SoapUI NG Pro and so far, everything I wanted I could perform. But now I'm stuck with a problem. 

 

I have a TestCase (Soap Request) that requests an answer from an TimeTable-service. The values for the different input-fields in the request I'm getting out of an Excel-file in a DataSource-TestStep. Now, to validate the response, I have an XML-file on my local system that I want to use. I would like to compare the XML-Structure in the local file to the "Response-Property" of the Request (XML too) to see if the XML-Structure is the same or not. 

 

I've tried the DataSource-TestStep with XML as source but I can only get single notes and their values as properties, but I just want the whole XML-Structure in a property to compare to the actual response of the SOAP-Request.

 

Can you help me ?

 

Regards, 

 

gaveeee

  • If you just need to read a file, you can use a File Wait test step, as this will read a file and then give you the contents as a property. The alternative would be to use Groovy script to read a file.

     

  • Radford's avatar
    Radford
    Super Contributor

    If you just need to read a file, you can use a File Wait test step, as this will read a file and then give you the contents as a property. The alternative would be to use Groovy script to read a file.

     

    • gaveeee's avatar
      gaveeee
      Occasional Contributor

      Hello Radford,

       

      Thank you very much! That's exactly the answer I was looking for. 

       

      The Groovy alternative I've already heard about, but since I don't know Groovy I hoped there's an other solution for that.