Forum Discussion

Franky's avatar
Franky
Occasional Contributor
17 years ago

file data source

hi,

I am new to soap ui pro.i want to do functional data driven test.  the user guide is not clear. any one can help out with clear steps.


thanks
franky

9 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Franky,

    Do as follows;

    1) Create a data file with lines containing comma-separated values
    2) Create a datasource step and select the File DataSource to the left
    3) Specify the file and separator
    4) Add properties to the left for each "column" in your file

    This should be enough to read the data, press the Test button at the top, you should get a number of rows containing your values in the log

    Now continue with

    5) Create a request step after your datasource step
    6) Add property-expansions in the request xml where you want to use your DataSource values  (You can use the Transfer-From, wizard for this; http://www.soapui.org/userguide/functio ... zards.html)
    7) Add a DataSourceLoop step after the request, set its DataSource step to the one created above and the target step to your request step

    Now run the TestCase containing your teststeps, you should get a request for each row in the data file with the values inserted into your request..

    oh.. I'm sure I forgot something above.. just post again if you run into any problems!

    Good Luck!

    regards,

    /Ole
    eviware.com
  • Franky's avatar
    Franky
    Occasional Contributor
    Hi  omatzura,

    Thank U so much for ur Immediate reply.
    I  havetried as  per ur mail.Also itz working fine.But i can see  the Response XML for the Last data on the Input file.

    For example , i passed three values . At the end of the Execution i can see the Response for the third value only.

    So i Just want to confirm whether all the three have been passed..?
    if yes , then how to see the response  for all  the values.?

    Regards,
    Franky.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    The log in the TestCase editor should have a request entry for each request made during the execution of your testcase (one for each value in your DataSource). You should be able to double-click each entry in the list to see that entries' message exchange..

    Hope this helps!

    /Ole
    eviware.com
  • Franky's avatar
    Franky
    Occasional Contributor
    Hi,

    Thanks..It is working.

    One more thing ..

    Can we get the Session ID of the connection .?
    If so ., how to get it & save it for future Requests..?

    Thanks & regards,
    Franky.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    where/how is the session-id returned by the server? in the soap-message/header or as an HTTP-Header?

    regards,

    /Ole
    eviware.com
  • Franky's avatar
    Franky
    Occasional Contributor
    Hi ole,

    Actually we need to get the session-id.
    Hope the Session-id is in the Soap response.

    Thanks,
    Franky.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    it has to be there somewhere so it can be sent back with subsequent requests, otherwise the server wont have any way of knowing which session a request "belongs" to..

    regards,

    /Ole
    eviware.com
  • Franky's avatar
    Franky
    Occasional Contributor
    Hi,

    Thanks for ur prompt response.

    if i have my session in soap response, then how to retrieve that session id alone in soapui pro. is there any method/feature available?

    thanks
    franky
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    you should be able to use a property-transfer to extract the session-id to a properties-step, from there you can insert it into all subsequent requests with either a property-transfer or by using property-expansion directly in the request..

    Hope this helps!

    regards,

    /Ole
    eviware.com