Jump to content
WAPT Forum
Sign in to follow this  
Guest Jeffrey

Incorrect Parameter

Recommended Posts

Guest Jeffrey
I'm running a load test (with multiple users) on an app that creates a new entity, places it in edit mode, and then adds one or more items to it.

The app uses a dialog-based control to associate the new items to the entity. WHen the dialog is started, the id of the entity is passed into the dialog.

I'm having a problem however at this point. During the recording session, everything works as expected. The entity is created and the identifier is passed to the dialog, the items are added, and the entity is saved. On playback, however instead of passing the identifier of the newly-created entity, it passes the same identifier created at the time the session was recorded so I end up with a myriad of database errors (foreign key constraint violations).

Is there a way I can "trick" my test into using the dynamically-generated entity id to pass to the dialog-box?

Any advice would be greatly appreciated.

Jeff

Share this post


Link to post
Share on other sites
Guest angela
QUOTE (Jeffrey @ Apr 23 2008, 02:55 AM) <{POST_SNAPBACK}>
I'm running a load test (with multiple users) on an app that creates a new entity, places it in edit mode, and then adds one or more items to it.

The app uses a dialog-based control to associate the new items to the entity. WHen the dialog is started, the id of the entity is passed into the dialog.

I'm having a problem however at this point. During the recording session, everything works as expected. The entity is created and the identifier is passed to the dialog, the items are added, and the entity is saved. On playback, however instead of passing the identifier of the newly-created entity, it passes the same identifier created at the time the session was recorded so I end up with a myriad of database errors (foreign key constraint violations).

Is there a way I can "trick" my test into using the dynamically-generated entity id to pass to the dialog-box?

Any advice would be greatly appreciated.

Jeff


Hello Jeff,

It seems that you need to use variables, so that you can find ID for created object with the help of functions. This way in each next request you will be able to enter it in the required field.
Now the situation is the following. When you record, one ID is created, and the same ID is enetered in the field for every new object.

Share this post


Link to post
Share on other sites
Guest Jeffrey
QUOTE (angela @ Apr 24 2008, 03:28 AM) <{POST_SNAPBACK}>
Hello Jeff,

It seems that you need to use variables, so that you can find ID for created object with the help of functions. This way in each next request you will be able to enter it in the required field.
Now the situation is the following. When you record, one ID is created, and the same ID is enetered in the field for every new object.


Thanks Angela for your quick response. It seems I am able to apply your suggestion to other scenarios, but not this one. I'm attaching a screenshot of part of a profile after the first recording. Notice that the d parameter has the value 44314. Subsequently, this value is used in the next POST. The URL is page_8: http://mmusmop600//Dialogs/IngredientListE...d=44134&s=0

In other tests I've been able use a variable to have WAPT read in the values from a list; however, this value is dynamically allocated to a newly-created record. How would I go about capturing the generated value into a variable? I've attempted this but I wasn't able to do it correctly.

[attachment=22:wapt_upl...reenshot.PNG]

Best regards,

Jeff

Share this post


Link to post
Share on other sites
Guest angela
QUOTE (Jeffrey @ Apr 24 2008, 10:44 PM) <{POST_SNAPBACK}>
Thanks Angela for your quick response. It seems I am able to apply your suggestion to other scenarios, but not this one. I'm attaching a screenshot of part of a profile after the first recording. Notice that the d parameter has the value 44314. Subsequently, this value is used in the next POST. The URL is page_8: http://mmusmop600//Dialogs/IngredientListE...d=44134&s=0

In other tests I've been able use a variable to have WAPT read in the values from a list; however, this value is dynamically allocated to a newly-created record. How would I go about capturing the generated value into a variable? I've attempted this but I wasn't able to do it correctly.

[attachment=22:wapt_upl...reenshot.PNG]

Best regards,

Jeff



Hello Jeff,

You can try to use the function "Parameter from URL". It seems that it will be the best solution for your case. As far as I remember I uloaded a small tutorial in the Variables section of the forum.
If you have any questions, please let me know.


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×