Forum Discussion

6 Replies

  • DotTest73's avatar
    DotTest73
    Occasional Contributor
    I really need a little help with this.
    I know it might be something simple, but Im not familiar with this way of testing.


    Thanks
    DT
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi DT,

    This is a very common use of SoapUI. You should use a data-source for your tests. To get started, you just need a simple Excel file with your phone numbers, and a data-source test step in SoapUI which consumes the Excel file.

    Please read more about data-sources on our website:

    http://www.soapui.org/Data-Driven-Testi ... urces.html

    Regards,

    Renato
  • DotTest73's avatar
    DotTest73
    Occasional Contributor
    Hello Renato
    I have used Datasources,, inside SOAP calls,, but never on the URL.
    I just want to change part of the URL dynamically, on each request..
    This sound very simple, but I cannot make it work.

    Have anybody tried to change the actual URL on each request,, dynamically?


    Thanks again

    DT
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Suppose you have the scenario described in our Data-driven tests:

    http://www.soapui.org/Data-Driven-Testi ... tests.html

    In that case, the a simple SOAP request looks like this:


    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
    <soapenv:Header/>
    <soapenv:Body>
    <web:ConversionRate>
    <web:FromCurrency>${DataSource#From}</web:FromCurrency>
    <web:ToCurrency>${DataSource#To}</web:ToCurrency>
    </web:ConversionRate>
    </soapenv:Body>
    </soapenv:Envelope>


    You can see the properties that are read from the DataSource TestStep in the format ${property-name}. This will be replaced with the actual value received from the data source at run-time.

    You could use one of those properties in your URI as well, for example:

    http://localhost:8080/${DataSource#From}


    You can use properties like this virtually everywhere in SoapUI!

    Does this help?

    Renato Athaydes
    SmartBear Software
  • GTaylor's avatar
    GTaylor
    Occasional Contributor
    DotTest,
    I just did something similar to this. I used an HTTP Test Request Step. You can see one in my screen shot. You add the target URL and then the GUI allows you to add post data in the editor which may be what you need. As you can see, the post data is populated from another step (DataSource)in my suite. I think it if you get this test step out and start tinkering with it, you will get what you need out of it.
    My particular instance also returned an xml response which the HTTP Test Request Step shows the results to the right making it easy to map to the next test step.

    I hope this helps.

    GT.