GettingStartedTutorial.pdf
SilkTest? 2006 Release 2
Glossary:
application under test (AUT)
Chapter 1 Introducing SilkTest 5-24=19 pages
The SilkTest Host
The SilkTest Agent
The 4Test language: 4Test is an object-oriented fourth-generation language (4GL)
built-in recovery system: run tests unattended with confidence.
BaseState
Testing Methodology: consists of six phases
Plan -> Capture -> Create -> Run -> Report -> Track
File Types: eight types
.vtp, .ini(projectname.ini), .pln, .inc, .t, .g.t, .s, .res
Document Object Model (DOM) extension
enable a browser extension:
Adds the extension’s include file to the Use Files text box in the Runtime Options dialog
Chapter 2 Preparing to Use this Tutorial 25-52=27 pages
Web application, 26-36
Enabling the required extension:
1 Open the GMO Web application in your Internet Explorer browser:
2 On the Basic Workflow bar, click Enable Extensions.
3 Click Welcome to GMO and then click Select to enable(make sure it is not minimized)
4 On the Extension Settings dialog, click OK to enable the DOM extension.
5 Close Internet Explorer, restart it, and navigate to http://demo.borland.com/gmopost/.
6 On the Test Extension Settings dialog, click Test.
7 Click OK on the Test Passed dialog.
client/server application, 27-52
Specifying the Use Files: Options/Runtime
.inc files, to recognize the GUI objects in your application.
dynamic instantiation:
(If we were not using the gmoc.inc test frame to view the GMO application.
the SilkTest would have dynamically instantiated the objects as displayed in
the following image.)
??? to-do: what's the structure of test frame file?
For testing client/server applications, it is required that the Default browser be set to none.
1 In the Runtime Options dialog, confirm Default browser set to none
2 Confirm no browser extension in Use Files: no extend\explorer.inc
Setting-up to view object identifiers:
1 Start the GMO Application
2 In SilkTest, open the Record Window Identifiers dialog, Click Record/Window Identifiers.
3 Minimize the SilkTest main window
4 Set the AUT active: Click the title bar of GMO.
SilkTest uses the following syntax when tagging dynamically instantiated objects in client/server application:
Syntax: class("tag ")
Multi-tagging
Syntax: class("caption|index|window ID ")
five types of tags:
caption, prior text, index, window identifier and location for each object,
Chapter 3 Planning a Testing Strategy 53-68=15p
Creating a testplan, however, is not required.
A testplan consists of two distinct parts:
an outline,
and statements,
Indenting and changing levels
Importing a testplan: tab-indented and ASCII text file format
Indent the new line: click Outline/Move Right.
three default testplan attributes with predefined names:
Category
Component
Developer
Attribute Names: limited to 11 characters, cannot have spaces, not case sensitive.
(renaming attributes does not update those attributes that are already in use in existing testplans.)
attributes storage: stored by default in the testplan initialization file, testplan.ini,
Defining values for default attributes: click Testplan/Define Attributes.
Associating attributes: open the testplan, Select a testcase, Click Testplan/Detail.
Chapter 4 Capturing Your Application 69-90=21p
Test Frame: an include file (.inc), a repository of information about the AUT,
SilkTest references this test frame when recording and running testcases.
Building a test frame:
(The information captured for a Web application is different from that captured for a client/server application.)
Test frames for client/server applications
Windows that Precede the Main Window: a derived Invoke method
There are three steps to defining a derived Invoke method:
? Step 1: Record a declaration for the first window and include it in your test frame.
? Step 2: Complete the declaration for the wStartup constant.
? Step 3: Define an Invoke method in the main window declaration that calls the built-in Invoke method and performs
any actions required by the “first window”.
Modifying identifiers: more meaningful, easier to maintain,
two ways:
? After you have recorded the window declaration, by modifying them
directly in the test frame (.inc) or other declaration files, or
? As you record the window declarations, by modifying the identifier in
the Window Detail area of the Record Window Declarations dialog.
Chapter 5 Creating Testcases 91-112=21p
A testcase has three fundamental tasks:
- Drive the application to the state to be tested
- Verify that the actual state matches the expected state
- Return the application to its initial state (also called the base state)
There are three steps to recording a testcase:
? Step 1: Setting up to Record: Confirm the test frame, default browser
? Step 2: Recording the Setup Stage: Select the application state
? Step 3: Recording the Verification Stage:
Linking Scripts and Testcases to a Testplan
Testplan/Detail, Select the script file, Select the testcase
Recording from a Testplan: automatically inserts the script and testcase statements into the plan
Understanding How the Recovery System Works: base state.
(assure that an error in one testcase does not cause subsequent testcases to fail.)
Chapter 6 Running Testcases 113-120=7p
mark testcases for execution in two ways:
? Selecting a testcase in the testplan editor and choosing a marking
command, or
? Performing a mark by query, which marks only testcases that have been
assigned certain characteristics called attributes
the marking commands
? Mark
? Mark All
? Mark by Query
? Mark by Named Query
Running a Single Testcase from a Testplan: Click Run/Testcase
Chapter 7 Reviewing and Reporting Test Results 121-132=11p
The Results File: with a .res extension.
Color is also used in results files to identify various components.
Color Description
Blue Test description; also test output and informational messages from the recovery system
Red Test error
Gray Testcase was not executed
Green Test summary
Black Other
TrueLog:
Options/TrueLog
Results/Launch TrueLog Explorer
Difference Viewer: dual-paned, display-only
Updating expected values:
1 In SilkTest, click the Difference Viewer window to make it the active window
2 Update the expected value: Click Results/Update Expected Value.
Generating Pass/Fail Reports:
1 In SilkTest, make the results file the active window
2 Open the Pass/Fail Report dialog: Click Results/Pass/Fail Report.
3 Select the attribute on which you want to report
4 Generate the report: Click Generate.
Chapter 8 Testing Databases 133-141=8p
DBTester functions:
DB_Connect
DB_Disconnect
DB_ExecuteSql
DB_FetchNext
DB_FetchPrevious
DB_FinishSql