Forum Discussion

JShah's avatar
JShah
Contributor
15 years ago

REST Post Service data providing problem

Hi,

I'm trying to do Data driven testing for REST Services (post Method) using SoapUI pro.

Steps in testsuite:

Created a Datasource ( i used excel for providing data)
Created a REST post request
Created a Data source loop


but the problem is that the data I'm passing to the excel is very lengthy that i could not complete providing data for the REST post request in single row of excel.



i want to provide the data for 1000 iteration of REST post request in single excel file

Note:--
the data source loop step loops back to REST post request for each row in data source(here i used excel)


can you guys please help on this Issue to provide the data randomly for 1000 iterations of POST Request.

please find the attached xml to check the data we are passing to the POST Request .
we need to pass different xml's for 1000 iterations

Thanks in Advance.

Thanks
Krish

18 Replies

  • I'm using ${DataSource#claimdata} only,no issues with that.

    I will forward my project to you guys,have a look
    btw did you guys provide any online voice chat support for Pro Users?
    the communication between us taking lot of time.

    Please let us know

    Thanks & Best Regards,
    Krish
  • JShah wrote:
    I'm using ${DataSource#claimdata} only,no issues with that.

    I will forward my project to you guys,have a look
    btw did you guys provide any online voice chat support for Pro Users?
    the communication between us taking lot of time.

    Please let us know

    Thanks & Best Regards,
    Krish

    Great, then we can have a look at it!

    We do not provide voice chat support in normal circumstances, although we will arrange voice chats or screen sharing if it's required to solve a customer's issue.


    Regards

    Henrik
    SmartBear Sweden
  • Hello,

    Just want to make clear...do you need another claim_id for each post request
    (i.e. do you need to execute GET request before every POST request or just once)?
    If this is true than your DataSourceLoop test step should probably point to
    'Method 1 Get Request - Request 1'.

    Can you send me those 3 xml files so I can check them?

    regards!
    Predrag
    SmartBear
  • yes,I need new claim_id to be generated before each post request(i.e. I need to execute GET request before every POST request)

    I'm forwarding you the 3 xml's


    one more thing I tried like DataSourceLoop test step pointing to
    'Method 1 Get Request - Request 1'..but I got no Results (process continuing....)

    PFA
  • Hi,

    The proper order of your TestSteps should be:

    DataSource
    Method 1 - Get Request 1
    Property Transfer
    Method 2 - Post Request 1
    DataSource Loop (DataSource Step should be DataSource, Target Step should be Method 1 - Get Request 1)

    The reason for this is so that the frist step that is run is the DataSource, initializing the test.
    Then, the GET request is executed after that, generating a new claim_id. Now, the Property Transfer copies the claim_id into the TestCase, and after that the POST request is sent, using data from the DataSource and the claim_id from the TestCase. Finally, the DataSource Loop will increment the DataSource to the next row, and jump back to the GET request to generate a new claim_id, and so on, until all files in the directory have been sent.

    Please try reordering your teststeps as I've outlined, and make sure the DataSource Loop configuration is correct.

    Regards,
    Dain
    SmartBear Sweden
  • Hi,

    I reordered the Steps like the way you mentioned,Now each xml in the directory data Source(containg xml1,xml2 & xml3) is Invoked and
    POST Request Successful.

    But

    In the Load Testing I used,

    Threads=1

    Limit =3 Total Runs

    when I run the Load Test , 9 POST Requests are happening.

    i.e. each xml in the directory data source is looping like this way

    xml1--> xml2-->xml3--->xml1--->xml2--->xml3--->xml1--->xml2--->xml3

    PFA for Load Testing Screen shot.

    It should end the loop after executing first 3 xml once.

    can you please help me on this.

    Thanks in Advance,
    Krish