Jump to content


Incorrect Parameter


  • Please log in to reply
3 replies to this topic

#1 Guest_Jeffrey_*

Guest_Jeffrey_*
  • Guests

Posted 22 April 2008 - 07:55 PM

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

#2 Guest_angela_*

Guest_angela_*
  • Guests

Posted 24 April 2008 - 09:28 AM

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.


#3 Guest_Jeffrey_*

Guest_Jeffrey_*
  • Guests

Posted 24 April 2008 - 03:44 PM

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//D...E...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.

Attached File  wapt_upload_screenshot.PNG   14.77KB   20 downloads

Best regards,

Jeff

#4 Guest_angela_*

Guest_angela_*
  • Guests

Posted 29 April 2008 - 05:37 AM

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//D...E...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.

Attached File  wapt_upload_screenshot.PNG   14.77KB   20 downloads

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.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users