What does Promote Dynamic Parameter to WebTest Parameter Do?

Locked What does Promote Dynamic Parameter to WebTest Parameter Do?

  • viernes, 13 de julio de 2012 14:30
     
     

    Several times after recording a web performance test - immediately after VS has completed the automatic 'detecting dynamic parameters' phases, I've been presented with a dialog box that lists what look like some of the page form variables, and asks me if I want to promote them from dynamic parameters to webtest parameters. 

    Can anyone explain what that means (ie. what the difference is between the two types of parameter), and hence what the impact is of clicking either 'Yes' or 'No' to the question?

Todas las respuestas

  • sábado, 14 de julio de 2012 4:49
     
     

    Take a look at this article which explains the significance of dynamic parameters http://msdn.microsoft.com/en-us/library/ff356199.aspx

    Thanks,

    Anuj


    http://www.anujchaudhary.com

  • lunes, 16 de julio de 2012 11:07
     
     Respondida Tiene código

    Hi,

    Let me answer your questions directly:

    Dynamic parameter is a parameter which most commonly changes with your session. It could be a session parameter, hidden field, control name dynamically generated, etc. When you record your script those values are captured and bounded directly to you webtest parameters. VS runs the "dynamic parameters detection" mechanism to find out which values change after each execution of the script (so to name it - which of the values are dynamic). If it finds such values then it suggest to extract them and bind the extracted values to the webtest paratemers. Keep in mind that each time VS runs "dynamic parameters detection" mechanism it actually EXECUTES the webtest. See my example:

    I recorded a webtest which has a session ID. So my parameter for my login and home pages is something like this:

    http://serverName/LoginPage.aspx - //here VS finds the Dynamic Parameter called SessionID
    
    http://serverName/Home.aspx
    	- QueryString Parameters
    		- SessionID = skdhw39dn3cv67903 // here VS uses the Dynamic Parameter. Notice that this is hardcoded.

    When VS run the "dynamic parameters detection" mechanism it will find out that the SessionID changed after the execution of the webtest. So it suggests to extract the SessionID to a webtest parameter and bind it to SessionID parameter. If I click "Yes" in the dialog box, VS will add an extraction rule to my webtest and will automatically bind it to the SessionID. So it will look like this:

    http://serverName/LoginPage.aspx
    - Extraction Rules
    - Extract Form Field {{SessionID}} http://serverName/Home.aspx - QueryString Parameters - SessionID = {{SessionID}} \\here VS uses the Dynamic Parameter. Notice that this is parametrized now.

    So to conclude. It's rather ok to click the "Yes" button, as VS is trying to safe some of your work. But sometimes it just makes things harder. So you need to be very careful when you are binding dynamic parameters to you webtest parameters. Keep in mind that you can always undo the process (Ctrl+Z), so it's always worth trying.

    Hope this will help,

    Roman

    • Marcado como respuesta GreatElectron martes, 17 de julio de 2012 15:39
    •  
  • martes, 17 de julio de 2012 15:42
     
     

    Thanks, woodchuck84, that's exactly what I wanted to know.

    So it looks like, in conclusion, when I get the dialog asking if I want to promote the values, I click Yes for values that genuinely do change on each run, and where VS should obtain the values from things like hidden form fields, but I should click No for values for which I actually want to keep the same hard-coded value every time the test is run.

  • miércoles, 18 de julio de 2012 6:26
     
     

    Yes, that's right. But keep in mind that only Dynamic Parameters will be presented to you in the dialog. There might a lot of other parameters which are hard-coded in your web test, but if VS won't find any change in values for those parameters, it will skip them and not show them in the dialog.

    Roman