header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
December 02, 2008, 01:12:31 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
Another datasource Q
Welcome, Guest. Please login or register.
December 02, 2008, 01:12:31 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Another datasource Q
« previous next »
Pages: [1] Print
Author Topic: Another datasource Q  (Read 364 times)
Jon
Newbie
*
Posts: 20


« on: May 30, 2008, 07:50:12 pm »

Probably a simple one... hopefully.

I now have a case where I have an inner and outer loop.  Trouble is, the inner loop not only  needs to read from a datasource, it also needs to modify the read value (an int) by multiplying it by the current loop iteration value. 

ie:

Code:
Read in value: 1000
Current OUTER loop iteration: first time through.
Value to be sent in webservice request: 1000 + (10 * 0)

Read in value: 1000
Current OUTER loop iteration: second time through.
Value to be sent in webservice request: 1000 + (10 * 1)

Read in value: 1000
Current OUTER loop iteration: third time through.
Value to be sent in webservice request: 1000 + (10 * 2)

Notice the increment (0, 1, 2, ...).

I guess I'd need to have a script take that read-in value, massage it appropriately and store it to a property, which I can then use in a later test step.  Just don't know how I'd write the script portion.

Note that at the end of each inner loop, the datasource will be reset and the read will begin again.  There are (for now, for simple testing) 10 values to be read in (1000-1009, hence the '10' in the calculation in the pseudo code block, above).  The outer loop is itself driven by another datasource, which is never reset.
« Last Edit: May 30, 2008, 07:54:10 pm by Jon » Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,470


« Reply #1 on: May 30, 2008, 11:33:34 pm »

Hi Jon,

how are you keeping track of the outer loop iteration value? (so I can get the script right..)

regards,

/Ole
eviware.com
Logged
Jon
Newbie
*
Posts: 20


« Reply #2 on: June 02, 2008, 02:25:34 pm »

Well, I'm totally open to suggestions for improvement, but at this time, I have a TestCase property that stores the value.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header