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
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
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.

 

post-67-1209050982.png

 

Best regards,

 

Jeff

Share this post


Link to post
Share on other sites
Guest angela
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.

 

post-67-1209050982.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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...