Forum Discussion

aaron_ehrensber's avatar
aaron_ehrensber
Contributor
17 years ago

Strategy needed - What would I use for this?

I want to pull 100 UUIDs out of my DB.

I then want to create 100 concurrent threads, one per ID, to toss against my system as HTTP Requests.

What strategy/tools/components should I use to do something like that?  I'm kinda floundering on trying to figure out how I can use soap UI to accomplish that.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    with soapUI:
    - create a Setup Script in your loadtest that loads the 100 values into a list and saves it to the loadtestcontext
    - in your testcase have a groovy script that gets "its" value from this list via the context.ThreadIndex property and writes it to a property-step
    - use this property-step property in your request in a parameter/header/body/etc.

    with soapUI Pro
    - create a DataSource teststep that reads the ID property from your database (set the DataSource) to be shared in the DataSource options dialog
    - use this property in your request in a parameter/header/body/etc.

    both
    - Create a LoadTest with 100 threads and a run limit of 100 runs

    run the loadtest.. and hold your thumbs :-)

    regards!

    /Ole
    eviware.com
  • OK, awesome, but any hints here?

    I ran a select id from documents; script in my datasource and it says I returned 10 rows.  Yet, I don't see any IDs in the display and my requests fail with no ID specified.  Why would it say it got 10 results but yet not show me the results?  Hints?
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Aaron,

    can you show a screenshot of the DataSource configuration panel so I can see your setup?

    regards!

    /Ole
    eviware.com
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    thnks! could you try

    select docId from..

    instead?

    /Ole
    eviware.com
  • Sorry, I don't follow.

    If I do select docId from DOCUMENTS where....  it fails because there is no docId column in my DB table.  The column name is ID.

    Are you saying I should put a "select docId from .." command after my initial call or something?  Sorry, just don't follow what you're asking me to try.

    I appreciate the help though!
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    oh ok. The properties in the DataSource need to be named the same as the returned columns, so either rename the column to docId in the query (as..), or rename the property in the table to the left to "ID"

    does that help?

    regards!

    /Ole
    eviware.com
  • But it appears now that I'm at the point to run my load test....I have one more issue.  My Datasource does the SELECT ID from and this works...

    My load test does 20 concurrent threads and uses ThreadIndex so I know that I have 20 different users....

    But the last thing in each test is to send across a HTTP request....the request debug is printing with users 1..20 like expected, but they all have the same ID from the datasource.  Do I have to add something from the datasource in my transfer property to tell it to increment the results from the datasource?
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Aaron,

    have you set the DataSource to be shared between threads (in the DataSource Options dialog)?

    regards,

    /Ole
    eviware.com