Silk Test Workbench Visual Tests en
Silk Test Workbench Visual Tests en
Silk Test Workbench Visual Tests en
Copyright 2010 Micro Focus (IP) Limited. All Rights Reserved. SilkTest contains derivative works
of Borland Software Corporation, Copyright 2010 Borland Software Corporation (a Micro Focus
company).
MICRO FOCUS and the Micro Focus logo, among others, are trademarks or registered trademarks
of Micro Focus (IP) Limited or its subsidiaries or affiliated companies in the United States, United
Kingdom and other countries.
BORLAND, the Borland logo and SilkTest are trademarks or registered trademarks of Borland
Software Corporation or its subsidiaries or affiliated companies in the United States, United
Kingdom and other countries.
All other marks are the property of their respective owners.
ii
Contents
Welcome to the SilkTest Workbench Visual Test Tutorial......................................5
Introducing the GUI....................................................................................................................5
SilkTest Workbench Main Screen....................................................................................5
Start Screen....................................................................................................................6
Visual Navigator..............................................................................................................8
Recording a Visual Test: Introduction.........................................................................................9
Starting the Sample Web Application............................................................................10
Recording a Visual Test for the Sample Web Application..............................................10
Saving and Naming the Visual Test...............................................................................11
Reviewing the Recorded Test Steps..............................................................................12
Playing Back the Recorded Visual Test.........................................................................13
Analyzing Results: Introduction................................................................................................14
Result Window Overview...............................................................................................14
Using the Result Window Tabs......................................................................................17
Using the Result Window Toolbar..................................................................................18
Using the Properties Pane.............................................................................................18
Using the Screen Preview.............................................................................................19
Enhancing the Visual Test: Introduction....................................................................................20
Updating From the Screen Preview...............................................................................20
Inserting a Verification...................................................................................................20
Creating a Local Variable to Store Application Data......................................................22
Storing Application Data to the Local Variable...............................................................22
Playing Back and Analyzing the Enhanced Visual Test.................................................23
Executing a Visual Test Within a Visual Test: Introduction........................................................24
Modular Testing.............................................................................................................24
Recording the Second Visual Test.................................................................................25
Inserting One Visual Test Within Another......................................................................26
Responding to Playback Errors: Introduction...........................................................................26
Playing Back the Modular Test.......................................................................................26
Debugging Errors..........................................................................................................27
Tracking Variables During Playback...............................................................................28
Reviewing the Result.....................................................................................................29
Modifying the Visual Test that Contains Errors..............................................................29
Contents | 3
Using ActiveData......................................................................................................................30
Reviewing the ActiveData File.......................................................................................31
Creating the ActiveData Test Asset...............................................................................31
Creating Repetition Logic for ActiveData Files..............................................................32
Defining the Steps to Repeat.........................................................................................33
Mapping ActiveData to Literal Data...............................................................................33
Playing Back and Analyzing the ActiveData Visual Test................................................35
Playing Back Scripts From Visual Tests....................................................................................35
Creating a Script to Generate Random Numbers..........................................................36
Defining the Script Input Parameters.............................................................................37
Defining the Script Output Parameters..........................................................................38
Setting Up the Visual Test to Use Script Data ..............................................................38
Using Script Data in the Visual Test ..............................................................................39
Playing Back and Reviewing Test Results.....................................................................39
4 | Contents
Welcome to the SilkTest Workbench Visual
Test Tutorial
Welcome to the SilkTest Workbench Visual Test tutorial, a self-paced guide that demonstrates how to use
SilkTest Workbench's visual, storyboard-based interface to create powerful and flexible functional tests. In this
tutorial, you will learn the basic steps required to create a visual test, play back the visual test, and then analyze
the results of the playback. Additionally, you will learn how to use a number of features that allow you to quickly
update and enhance a recorded visual test.
This tutorial uses the SilkTest sample Web application, http://demo.borland.com/InsuranceWebExtJS/, to
create a real world scenario in which you practice using SilkTest Workbench to create repeatable tests.
The lessons in this tutorial are designed to be completed in sequence as each lesson is based on the output
of previous lessons.
Click Customize to change the option to display the Start Screen when SilkTest Workbench starts.
Click Close at any time to hide the Start Screen.
Click Collapse Bottom Panel to hide and Expand Bottom Panel to show the Tasks and Help panes in the
Start Screen.
Tip: You can always access it from the main screen by clicking the Start Screen in the watermark. You
can also press Ctrl+Alt+S, or choose View ➤ Start Screen at any time to display it.
Note: The user interface works with standard Windows small and large font sizes. Using a custom font
size may result in the inaccurate display of text in the user interface.
Test Steps
Lists each step of a visual test in clear non-technical language.
Screen Preview
Displays a snapshot of the application under test as it appears when a step
executes during playback of a visual test.
Properties
Displays the properties of a step in a visual test.
Note:
SilkTest Workbench takes snapshots under the following circumstances:
• Before every automation test step during recording.
Note: For SAP applications, snapshots occur when the screen changes rather than before every
automation test step.
The Screen Preview, Storyboard, and Properties panes are synchronized with the Test Steps pane and
display information specific to a selected step in the Test Steps pane. In this way, you can easily view all
aspects of a step by selecting a step in the Test Steps pane, and then viewing information about the step in
the other panes.
In addition to viewing a visual test, the Visual Navigator also allows you to enhance or update an existing
visual test by using the Screen Preview and Properties panes. For example, in the Properties pane, after
recording a visual test, you can change the literal value of a recorded property by replacing it with a variable.
Additionally, to quickly update a visual test when changes occur in the application under test, you can update
previously captured screens using the Update Screen feature of the Screen Preview.
The Visual Navigator also displays the playback result of a visual test using the same panes as those used
for a visual test. For a result, the panes have additional functionality and appear in the Result window, which
contains toolbar options and several tabs that display different views of result content. Examples of additional
functionality specific to a result include the ability to see the pass or fail status of each step in the Test Steps
pane. Additionally, in the Screen Preview, you can see a comparison of the differences between the screens
captured during recording and screens captured during playback, and then update the existing visual test
without accessing the test application.
Note: Before you record or playback Web applications, disable all browser add-ons that are installed in
your system.To disable add-ons in Internet Explorer, choose Tools ➤ Internet Options, click the Programs
tab, click Manage add-ons, select an add-on and then click Disable.
1. To record DOM functions to make your test faster and more reliable, perform the following steps:
a) Choose Tools ➤ Options.
b) Click the plus sign (+) next to Record in the Options menu tree.
The Record options display in the right side panel.
c) Click xBrowser.
d) From the Record native user input list box, select No.
e) Click OK.
Note: Typically, when you test Web applications, you use native user input rather than DOM functions.
Native user input supports plug-ins, such as Flash and Java applets, and applications that use AJAX,
while high-level API recordings do not.
2. To ensure that all browser add-ons are disabled, perform the following steps:
Before you record or playback Web applications, you must disable all browser add-ons.
a) In Internet Explorer, choose Tools ➤ Internet Options.
The Internet Options dialog box opens.
b) Click the Programs tab and then click Manage add-ons.
The Manage Add-ons dialog box opens.
c) In the list of add-ons, review the Status column and ensure that the status for each add-on is Disabled.
If the Status column shows Enabled, select the add-on and then click Disable.
d) Click Close and then click OK.
3. To access the sample application remotely, click http://demo.borland.com/InsuranceWebExtJS.
The sample application Web page opens.
4. If you installed the Web application locally, perform the following steps:
a) Choose Start ➤ Programs ➤ Borland ➤ Borland Demo Application ➤ Startup Demo Environment.
The database starts.
b) Choose Start ➤ Programs ➤ Borland ➤ Borland Demo Application ➤ Demo Application.
The sample application Web page opens.
To install the Web application locally, chooseStart ➤ Programs ➤ Silk ➤ SilkTest <version> ➤ Sample
Applications ➤ xBrowser ➤ Test Application and then extract and run the EXE file.
Because the test has not been named yet, the Save As dialog box opens.
2. In the Name text box, change the name to AutoQuote.
(Number)* Represents the sequential order in which steps are recorded and played back.
Steps display in this sequential order by default.
Any steps that have breakpoints added for debugging display a breakpoint in the
column next to this column.
If you change the view from the default view (Steps and Screens) to the Screens
only or the Steps only view, the numbering scheme sequentially skips the steps or
screens to indicate the gap in the recording sequence.
(Logic)* Displays icons representing the type of logic for the step, if the step contains logic.
(Step Type)* Displays icons representing the type of action being executed in the step.
(Step Description)* Displays a user-defined step description. This column does not display in the default
view, but can be shown by clicking Actions from the Test Steps pane title bar and
then View ➤ Step Description.
To create a step description, select a step. In the Properties pane, update the Step
description property. A Step Description icon appears in this column indicating
that the step has a description. Either move your pointer over the icon to display a
ToolTip containing the description or select the step and read the description in the
Properties pane.
Tip: Different panes in the Visual Navigator are synchronized with the Test Steps pane. In the preceding
graphic, the recorded step that selects Auto Quote from the list box is selected in the Test Steps pane.
As a result:
• The Screen Preview shows the state of the application before Auto Quote is selected.
• The Properties pane shows the properties for the selected step.
• The thumbnail representing the group of steps related to selecting the Auto Quote list item is highlighted
in the Storyboard.
Scroll through the steps in the visual test and select various steps to view the updated information in the other
panes.
Test Steps
Lists information about the playback result of each step in the visual
test.
Screen Preview
Displays the Web application screens captured during playback.
Properties
Displays the properties of a step.
Storyboard
Provides a graphical outline and overview of a result.
Note: The Passed, Failed, and Flags tabs also display result information using the Visual Navigator.
The only difference is that these tabs display specific types of steps, whereas, the Details tab displays
every step.
Result
Contains properties that correspond to the columns in the Test Steps pane. Properties
such as the name of the step, the date and time the step was executed, and the time
it took to run the step.
Extended
Contains additional playback details such as the locator name SilkTest Workbench
properties
uses to identify the control or the value of the text entered by an Enter action step.
Extended properties are helpful to view the contents of variables or expressions when
they are used in action steps. For example, an Enter step that uses the variable
textVar as its value displays the contents of textVar in the Extended properties
category.
1. In the Test Steps pane, select the step that contains the year of the car.
Enter '2010'
In the Screen Preview, the screen captured during playback appears next to the screen captured during
the recording of the visual test. The control for this step, the browser window, is highlighted by a black box.
1. In the Test Steps pane of the AutoQuote visual test, select the step before the <<End>> step.
The step text is similar to the following:
Select link 'Home'
The Screen Preview displays the Purchase A Quote page and highlights the Home button.
2. In the Properties pane, click the Locator text box.
The locator selection buttons display in the value area of the locator.
3. In the Screen Preview, click Actions ➤ Zoom ➤ 75%, then use the scroll bars to position the screen so
that the Contact Us button is clearly visible.
4. In the Properties pane, click Identify from the screen preview.
The pointer moves to the Screen Preview.
5. Move the pointer over the Contact Us button and then click the Contact Us button.
When you click the button, the Locator property in the Properties pane changes to display the new locator
name for the button, and the step text in the Test Steps pane changes to the following:
Select link 'Contact Us'
6. Click Save.
The next time you play back the visual test, SilkTest Workbench clicks the Contact Us button instead of the
Home button.
Inserting a Verification
A verification is test logic that evaluates a user-defined condition, and then sends a pass/fail message and,
optionally, a flag to the playback result of a visual test.
In this lesson, you will insert a verification to ensure that the quote uses the correct vehicle model.
You have successfully enhanced the recorded visual test by inserting test logic that verifies the value of a
property in the sample application.
1. In the Test Steps pane, click Actions ➤ Insert ➤ Variable ➤ Add Local.
The Add Local Variable dialog box opens.
2. In the Variable name text box, type strEmailAddress.
3. From the Type list, select Text.
Leave the Initial value text box empty for this lesson, since a value will be stored to the variable in a
subsequent lesson.
The text type stores the variable value as a text, or string data type.
4. Click OK.
The new variable is saved for the visual test. Once the variable is created, you can see it and edit its
definition from the <<Start>> step.
5. To view the strEmailAddress variable, select the <<Start>> step in the Test Steps pane.
Tip: The <<Start>> step is always the first step in any visual test.
Properties for the step display in the Properties pane. With the <<Start>> step selected, strEmailAddress
displays in the Variables category defined as a Text variable.
The value area for the variable types indicate the number of variables of the type that are currently defined.
In this lesson, one Text variable has been created, so the value area for the item shows that one item is
associated with this test.
Now that you have created the local variable to store the quote email address, store the email address text
from the application to the variable.
1. In the Test Steps pane, select the step after the step that shows the email address value.
The step text should look similar to the following:
Select radio button 'id=autoquote:vehicle:0'
When the step is selected, the captured screen for the Get Instant Auto Quote page page displays in the
Screen Preview.
2. In the Test Steps pane, click Actions ➤ Insert ➤ Property from Control.
This inserts a step into the visual test just after the selected step. The step text should be similar to the
following:
Get the '' property of the control
7. In the Properties pane, click the Property text box, and then select Text from the list for its value.
8. Click (Select a local variable...) and then select strEmailAddress from the list.
Now that you have successfully identified the control, the property of the control containing the desired
value, and the variable in which to store the property value, the step text should read as follows:
Put the 'Text' property of the control into variable 'strEmailAddress'
The Local variable name value in both the Properties pane and the step text changes to strEmailAddress.
To confirm that the test captures the property value and stores it properly, play back the test and review the
result.
8. The contents of the strEmailAddress variable displays in the Result Detail column. To view the entire
contents of the Text property value, move your cursor over the Result Detail column for the step. A ToolTip
appears displaying the entire contents of the property.
Congratulations! You have successfully created a visual test that reliably tests the sample application. In the
next lesson, you will learn about several advanced testing concepts and features such as how to quickly and
easily execute a visual test within another visual test.
Modular Testing
Before creating visual tests, scripts, and other SilkTest Workbench assets to build application testing solutions,
it is a good practice to plan a testing strategy.
It is not necessary to include all the parts of a specific test solution in a single visual test or script and is not
usually beneficial to do so.
Typically, the most efficient testing approach is a modular approach. Think of your application testing in terms
of distinct series of transaction units.
For example, testing an online ordering system might include the following distinct transaction units:
• Log on to the online system
• Create a customer profile
• Place orders
• Log off the online system
If one test is created to handle all of these distinct units and there are ten different scenarios that use this test,
you would need to record ten different tests to handle the scenarios. If any change occurs to the application,
for example if an extra field is added to the logon window, ten different tests would require a change to
accommodate data input to the new field.
1. From the Recent list in the Start Screen, click AutoQuote to open it.
AutoQuote is the first visual test that you created in this tutorial.
2. In the Test Steps pane, select the <<Start>> step.
3. Click Actions ➤ Insert ➤ Visual test.
The Browse for Visual test dialog box opens.
4. From the Select an asset list, select the visual test named AddAccount and then click OK.
SilkTest Workbench inserts a step before the selected step. The inserted step calls the selected visual test.
The step text is as follows:
Playback visual test 'AddAccount'
Tip: During playback, when the preceding step executes, the original visual test plays back to completion
before the inserted visual test plays back.
In the next lesson, you will learn how to playback this modular visual test, and respond to a playback error.
1. With the AutoQuote visual test open, click Playback on the toolbar.
Now that you have encountered a playback error, you are ready to debug the test.
Debugging Errors
After SilkTest Workbench encounters a playback error, the SilkTest Workbench Playback Error dialog box
opens and provides the option to enter Debug mode. In Debug mode, playback is suspended, which allows
you to diagnose and fix any playback errors using the SilkTest Workbench debugging features.
In this section of the lesson, you will learn how to debug the error that occurred during playback of the modular
test in the previous section.
Step Into (F8) Executes playback one step at a time. Step Into is useful to trace through each step,
and steps into other visual tests inserted into the visual test being played back. Each
inserted visual test is also executed one step at a time.
Step Into is useful for detailed analysis of a test, and lets you see the effect of each
step or statement on variable usage and test application interaction.
Step Over (Shift Executes an entire visual test inserted into another visual test as if it were a single
+ F8) step. Use Step Over when playback is in debug mode for a step that plays back a
visual test. This plays back the inserted visual test in its entirety. Once the inserted
visual test plays back in its entirety, playback suspends in debug mode at the next
step in the original visual test.
Step Out (Ctrl + Executes all remaining steps in a visual test being played back from another visual
Shift + F8) test, then suspends playback at the next step in the original visual test.
Use Step Out when playback is suspended at a step in a visual test that has been
inserted in another visual test, and you want to playback the remaining visual test
and return to the original visual test. When playback executes the remainder of the
inserted visual test, it suspends and re-enters debug mode at the next sequential
line in the original visual test.
Run To Cursor Allows you to select a step where you want playback suspended. This allows you to
(Ctrl + F8) "step over" selected sections of a visual test.
Use Run To Cursor to playback the visual test and stop playback at a point just
before a run-time error occurs. This lets you stop playback at a specific line without
having to insert breakpoints. Once playback stops, you can continue using one of
the other debug options.
Run From Cursor Plays back the visual test from the currently selected test step.
Next, you learn how to monitor the values of variables used in the visual test.
3. To see how the Run to Cursor debugging works, select the step Click 'Lexus' at 24,9 and then
choose Debug ➤ Run to Cursor.
SilkTest Workbench plays back the remaining steps until the step Click 'Lexus' at 24,9, and then
displays the AutoQuote visual test.
Now you are ready to complete the playback of the modular test and review the test results.
1. Click Playback on the toolbar to complete playback of the AutoQuote visual test.
The Playback Complete dialog box opens.
2. Click Go to Result.
The AutoQuote result appears with the Summary tab displayed by default.
The Summary tab displays the overall details of the test run. Note that the Visual tests or .NET Scripts
(number of times each ran) field lists AutoQuote(1) and the inserted visual test, AddAccount(1).
3. Click the Details tab.
4. In the Test Steps pane, scroll down to the steps in blue text.
By reviewing the Result and Result Detail columns, you can quickly find information about any errors that
occurred during playback.
Note: To view all steps in the Test Steps pane, make sure you have Steps and Screen selected. Click
Actions ➤ View ➤ Steps and Screens. The Failed tab does not display steps containing playback
errors. It only displays failed verifications.
Now that you have learned how to diagnose and debug playback errors, you are ready to modify the visual
test to record additional steps to fix the error.
13. Open the AutoQuote visual test and click Playback on the toolbar.
All three visual tests complete without any errors.
Using ActiveData
To effectively mimic application use, application testing often involves performing the same action or set of
actions repeatedly using different sets of data. For example, the previous lesson included recording a test that
created a customer record. To create ten customer records, you can record ten different tests, each with its
own set of customer data. However, with SilkTest Workbench you can enhance this original test to run repeatedly
for ten iterations and use a different set of data for each iteration.
With ActiveData testing, you can use data in external files as input to the test application, and then repeat
selected steps using different data for each iteration.
In this lesson, you will learn how to:
• Create an ActiveData asset and associate it with a visual test
• Create repetition logic that repeats selected steps a specified number of times, using different data for each
repetition
• Define how to use the ActiveData file in the visual test
• Define the steps to be repeated
• Map ActiveData in a data file to literal data in a visual test
In the previous lesson, you recorded a visual test that entered customer information for Pat Smith into the
customer database. Each time that visual test plays back, SilkTest Workbench uses the literal data values that
were captured during the initial recording.
In this lesson, you replace the literal data values used to input customer information for Pat Smith with
ActiveData, so that when SilkTest Workbench plays back the visual test, different customers contained in the
external file are used.
Before creating ActiveData for the visual test, review the ActiveData file.
1. In the Recent list on the Start Screen, double-click the visual test named AddAccount to open it.
The AddAccount visual test opens in the Visual Navigator.
2. In the Test Steps pane, click Actions ➤ Insert ➤ ActiveData ➤ New.
The ActiveData asset setup window opens.
3. In the Name text box, name the ActiveData asset by typing customers.
4. Click Browse to search for the customers.csv file to associate with the AddAccount ActiveData asset.
The Choose ActiveData Asset dialog box opens.
5. Navigate to the sample file location and select the sample ActiveData file, customers.csv.
By default, the location is: C:\Program Files\Silk\SilkTest\examples\customers.csv.
6. Click Open.
The path and file name appear in the File text box of the General tab.
7. In the ActiveData asset setup window, click the Options tab.
8. Check the Use first row as header check box.
This setting treats the first row of data in the ActiveData file as a header row, not as data.
9. Click Save and close to create the ActiveData asset and associate it with the AddAccount visual test.
In a visual test, information about any associated ActiveData assets is stored in the Properties pane of the
<<Start>> step. To review each ActiveData asset associated with the visual test , select the <<Start>>
step and review the ActiveData property in the Properties pane.
Now that the ActiveData asset has been created and associated with the visual test, you are ready to create
the repetition logic that will use the active data in the test.
1. Make sure the AddAccount visual test displays in the Visual Navigator.
2. Click Create Repetition Type Logic on the SilkTest Workbench toolbar.
The Test Logic Designer wizard appears with the Welcome page displayed.
3. Click Next.
The Select a Logic Type page opens.
4. Click Repeating a sequence of steps using data from an ActiveData file, and then click Next.
The Define the ActiveData asset to use page opens.
5. Since only one ActiveData asset (customers) has been associated with the visual test, it should appear in
the ActiveData asset list. If not, select it from the list.
6. In the Start row text box, leave the default value at 1.
7. Check the End at last row containing data check box.
8. Click Get all rows in sequence.
You have now defined how the data file will be used in the repetition logic, and how many repetitions will
occur.
• The first row of the Active data file will be used first when the repetition logic executes.
• The repeat will continue using each row until the last row is used.
• Since all rows of data will be used in the repetition logic in sequential order and there are 10 rows of
data in the ActiveData file, the steps to add a customer to the database will be repeated 10 times. For
each repetition, a different row of customer data from the ActiveData file will be used as input.
9. Click Next.
The Build the Repeat page opens.
Now that you have defined how the ActiveData will be used, you are ready to determine the steps in the visual
test that will be repeated.
1. Select the first step in the visual test that enters data into a field.
This should be the step that enters 'Pat' into the First Name text box on the Create a New Account page
of the InsuranceCo Web site, as originally recorded in the visual test.
The Select a Property, Variable, ActiveData or Edit a Literal dialog box opens. Use this dialog box to
map the data from the selected property in the test step to data from a column in the ActiveData file.
The ActiveData asset text box shows the ActiveData asset customers, which was associated with the
visual test. The column names from the customers ActiveData file display in the Columns list.
4. In the Columns list, select the First Name column.
This is the column in the file that contains first names, which you are mapping to substitute for the literal
data 'Pat'.
5. Click OK to close the dialog box and map the data. SilkTest Workbench replaces the actual data in the test
step with an expression that maps to the selected data in the ActiveData file. The existing step text:
Enter 'Pat'
now shows the name of the ActiveData asset, the type of data being substituted, and the column name:
Enter '[[customers].Text("First Name")]'
6. Repeat steps 1 through 5 for all other test steps containing data to be substituted with data in an ActiveData
file associated with the visual test. Start with the next step, which is the step containing the step text Enter
'Smith' text.
The following table shows:
• The text of each step in this visual test whose literal date is to be substituted with data from the ActiveData
file
• The name of the step property whose data is to be substituted
• The ActiveData column to select that contains the data that will be used in place of the literal data
Note: Steps updated using ActiveData that enter text into a password protected text box do not show
ActiveData information in the step text.
Now that this visual test has been set up to use data from an ActiveData file, play it back and review the results.
Note: You can also use expressions to update the ActiveData in a visual test. The Expression Designer
enables you to use data from an ActiveData file column as input, and create an expression that changes
the value of the data. The updated data can then be saved back to the same column in the same ActiveData
file. For details, see Updating ActiveData in a Visual Test Using an Expression in the online help.
9. To verify the script works properly, assign the parameters the following values after Sub Main():
Dim MinVal=16
Dim MaxVal=105
Your script should look like the following code:
Public Sub Main()
Dim rand As New Random()
Dim MinVal=16
Dim MaxVal=105
Dim TSrandomAge As Integer = rand.Next(MinVal, MaxVal)
MsgBox(TSrandomAge)
End Sub
args ("VT_Age")=TSrandomAge
where "VT_Age" is the names of the output parameters that we will create in the next procedure.
c) Since the script will pass the age to the visual test, comment out the message box code by placing an
apostrophe in front of the statement.
'MsgBox(TSrandomAge)
Next, define the script input and output parameters used to pass the random age to the visual test.
Define a local variable in the visual test to receive the output parameter.
9. In the Properties pane of the inserted script step, click in the value area of the Pass contents of
'TSrandomAge' into property and select the local variable VTrandomAge.
Since we added input parameters in the script, those values display in the Properties pane. However, you
can modify the input parameters used in the visual test by editing the values. These values are not changed
in the script.
Your visual test is now set up to use script data. Each time the AutoQuote_Modified visual test plays back, the
function_randomAge script is played back and passes a unique random number to the local variable,
VTrandomAge, in the visual test.
Now, modify the step that enters the age information to use the visual test local parameter containing the
random number generated in the function_randomAge script.
1. Select the step that enters data in the Age text box. The step text is as follows:
Enter '42'
This step will now enter the value of the VTrandomAge local variable in the Age text box.
Index | 41
test results (continued) verifications
properties pane 18 adding 20
screen preview 19 visual navigator 8
tabs 17 visual tests
toolbar 18 adding variables 22
window 14 adding verifications 20
tutorials enhancing 20
ActiveData 30, 35 inserting 26
generating random numbers 36 modular overview 24
playing back 39 naming 11
playing back 13, 23
recording 9, 10, 25
U reviewing 12
UI saving 11
overview 5 storing variables 22
updating 20
using with scripts 38, 39
V
variables W
adding 22
debugging 28 web application
storing data 22 starting 10
42 | Index