Forum Discussion

jkohout's avatar
jkohout
New Contributor
11 years ago

Transfering values to the EndPoint

Hi guys,

I'm very new in soapUI PRO, and I would like to ask you to help me with this procedure:
I have some JDBC request which gives me values "IdBankAccount" (10000084,10000096,10000032....):
I am connecting to this ENDPOINT
http://obs01:9900/ib-server-jat-ref

but for this special request I must specified "Full Path" to get response. So the entire Endpoint is like this:
http://obs01:9900/ib-server-jat-ref/bankaccount/10000084




And here comes the tricky part...
I need to transfer values "IDBankAccount" to the end of "FullPath" so the TestCase should be running like this:
1. run:
http://obs01:9900/ib-server-jat-ref/bankaccount/10000084
2.run:
http://obs01:9900/ib-server-jat-ref/bankaccount/10000096
3.run:
http://obs01:9900/ib-server-jat-ref/bankaccount/10000032
etc..

Is there any way how to do that?

Thanks for any help!

1 Reply

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

    Thank you for the detailed problem description. If you are familiar with properties and property expansion (http://www.soapui.org/Scripting-Propert ... nsion.html), solving this becomes quite easy

    Seeing as how you want to loop through the bank accounts, you probably want to use a JDBC DataSource (there's a good short video tutorial at http://www.soapui.org/Data-Driven-Testi ... tests.html) to be able to use one bank account at a time.

    In SoapUI, you can access properties virtually anywhere, even in the endpoint string. If you for instance have a project-level property foo that contains the bank account ID 100000 and then set the endpoint to http://obs01:9900/ib-server-jat-ref/bankaccount/${#Project#foo}, the request will be sent to http://obs01:9900/ib-server-jat-ref/bankaccount/100000.

    The test case structure you want would look something like this:


    - DataSource //set up to get the data from your JDBC connection
    - TestStep //use property expansion in the endpoint string like described above, probably something like ${#DataSource#idBankAccount}
    - DataSource Loop //targeting the test step (= go to the next step in the loop)


    Does this make sense? Let me know if it's unclear or if you have any further questions. I hope this helps!

    Regards,
    Arian
    SmartBear Sweden