Forum Discussion
- omatzuraSuper ContributorHi!
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 - aaron_ehrensberContributorOK, 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? - omatzuraSuper ContributorHi Aaron,
can you show a screenshot of the DataSource configuration panel so I can see your setup?
regards!
/Ole
eviware.com - aaron_ehrensberContributorScreenshot attached...
- omatzuraSuper ContributorHi!
thnks! could you try
select docId from..
instead?
/Ole
eviware.com - aaron_ehrensberContributorSorry, 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! - omatzuraSuper ContributorHi,
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 - aaron_ehrensberContributorPerfect! That fixed me up nicely! Thanks!
- aaron_ehrensberContributorBut 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? - omatzuraSuper ContributorHi Aaron,
have you set the DataSource to be shared between threads (in the DataSource Options dialog)?
regards,
/Ole
eviware.com