Hello,
I am curious if anyone has tried to do something like this:
Suppose you have
|fieldValue|field|
|John Public|name|
|Bob Smith|name|
|Sarah Pallen|name|
|Mr. Bill|name|
You would process your story with a line like this in your java:
@When("I type <fieldValue> into \"<field>\"")
This would correspond to the step
When I type <fieldValue> into name
This means, your story would run each line in the script four times -
one time for John Public, one time for Bob Smith.... one time for Mr. Bill.
Now, suppose you want to process multiple fields for each line?
If you tried the following, it would not work, since you would overwrite
your variables:
|fieldValue|field|fieldValue|field|
|John Public|name|50000.00|salary|
|Bob Smith|name|10000.00|salary|
|Sarah Pallen|name|999999.99|salary|
|Mr. Bill|name|10.54|salary
You could try and modify this to have
|fieldValue|field|fieldValue2|field2|
|John Public|name|50000.00|salary|
|Bob Smith|name|10000.00|salary|
|Sarah Pallen|name|999999.99|salary|
|Mr. Bill|name|10.54|salary
But, this is starting to get messy, since you would then need
@When("I type <fieldValue> into \"<field>\"")
in one method and
@When("I type <fieldValue2> into \"<field2>\"")
Has anyone run into this problem, before?
Thanks for any advice on this.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email