![]() Repeat step 2 until you have replaced all occurrences in the script.ĥ. Click Find repeatedly until the correct value is highlighted in the script and then click the Replace button.Ĥ. In the Datapool Literal Substitution window, as shown in below Figure, select the variable (column) you want to use from the Datapool Variable drop-down list.ģ. Script menu selection Find Literals and Replace with Datapool will be enabled if you have a script open that already has a datapool associated with it. Select the menu Script > Find Literals and Replace with Datapool Reference. You need to replace the literal strings (hard-coded values) with values from the datapool. You can associate only one datapool with a test script.Īt this point, you have associated only the datapool with the test script. You can then see the datapool listed in the Script Explorer. Right-click on the Test Datapool folder in the Script Explorer and select Associate with Datapool.Ģ. If you already have a shared datapool then you can add it to your test script as follows:ġ. In this case, you can either delete the redundant script lines, or you can replace the literal test input values as described in the following paragraphs. If you had already recorded typing or selecting values then the script will set the values twice. Note that this wizard will add new lines of code to set (input) datapool values to the test object selected in the wizard. If you had not already created or added a datapool for the test script, then a new one will be created. You can find more about the Data Driven Commands wizard in the online Help. Complete the wizard to select the data input objects. This is essentially the same as going into recording mode except that you will not see the recorder monitor.Ĥ. Select the menu Script > Insert Data Driven Commands, which will open the Data Driven Commands wizard as shown in below Figure. Position the cursor on a blank line in the test script where you want to add the data driven commands.ģ. You might want to play back the test script in debug mode, breaking (pausing) at the data input form or dialog.Ģ. Get the application under test to the appropriate point where the test data should be added. You can add a data driven code (commands that input test data from a datapool) using the Insert Data Driven Actions wizard as follows:ġ. You can use datapools for both test input and for expected values (verification points). You can change static test data in a script into dynamic values by adding datapool variables. Even if you choose certain test data to be variable using the data driven test wizard, you may not realize other hard-coded values that will later need to be changed. You often record tests using specific values, for input and expected values, which become hard-coded (literals) into the script. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |