Learning Center - How Would You Parameterise Log-On Credentials?

» Tutorials » Adding Parameters » How Would You Parameterise Log-On Credentials?

Parametrise Data Wizard

  • If the data you entered during the recording was a user name and password, how would you parameterise these so that when a random user name was used, the correct password was also used?
     
  • Again, create a simple text file but this time, on each line, have the user name separated by a delimiter from the password. If you used the comma delimiter, your file may look like this:

        user1,password1
        user2,password2
        user3,password3
        …
        …
     
  • It should be obvious that you now need two parameters: one for the user name and one for the password. This once again is easy to configure within StressTester™.
     
  • As described in the Parameterise the data you entered section, locate the step containing the user name and convert it to a parameter mapped onto the first column of the text file, with data served in a random order.

    Note: if your system only allows one session logged on with each user name at a time, use the Selector type of Random Unique - ensuring that no user name will be used more than once in the performance tests.
     
  • You now potentially have a problem: when you use a randomly selected user name, you need to ensure that the password is selected from the same line of the file.
     
  • This is where the Related Dynamic Data type is useful. This type allows you to configure StressTester™ to use data on the same randomly selected row of the file; so you can select the password corresponding to the user name.
     
  • Highlight the literal password value in the relevant step’s properties, and start the Dynamic Data wizard.
     
  • Select the type of “Related”, choose the item to relate to (the parameter you created for the user name), select column 2 (the column holding the password) and complete the wizard.
     
  • Your wizard screens will look something like those shown below:

    Paremetrise Entered Data - Wizard

    Parametrise Data Wizard

  • In the screen above, you will see that the sharing and value refresh options are greyed-out. This is because the related parameter will inherit the options set on the parameter to which it relates.
     
  • That’s it! When StressTester™ picks a row at random to obtain the user name value, it will pick the password from the same row.

 

« Parameterise Entered Data | Test the Parameterisation »
 


Not seeing the StressTester™ information that you need - please email Support.