Professional Documents
Culture Documents
Silk Presentation 2
Silk Presentation 2
Record Testcase
* Footnote
Source:Sources 1/7
Unit of measure
Testcase Failures
Occur when:
- The object you are testing does not meet verification requirements
- The application has changed and the commands in the testcase are no
longer valid for the application
- A window or message box appeared that your testcase was not
expecting
* Footnote
Source:Sources 3/7
SilkTest Recovery System
Unit of measure
•Is designed to automatically restore the application to a known state
after an unexpected error
•Ensures that each testcase begins with the application in its base state
before executing any application states
•Supports automated, unattended tests so that tests can be run after hours
•Makes sure that a failed testcase does not prevent subsequent testcases
from running
•Manages unexpected events in the application and aids in ensuring
reliable results
•Logs warnings and errors
* Footnote
Source:Sources 4/7
How SilkTest Handles Verification Failures
Unit of measure
* Footnote
Source:Sources 5/7
The Results File
Unit of measure
* Footnote
Source:Sources 6/7
Unit of measure
Extract Results
Open Project
- Open an existing project
- Auto Generating a New Project
Enable Extensions
* Footnote
Source:Sources 8/7
Data Driven Testcases
Unit of measure
•Let you store data combinations in a list of items and invoke the
testcase once for each item passing the data to the testcase as a parameter
•Can be associated with an external data source such as a spreadsheet,
file or database
•Can be executed against a specified set of records in a data source
•Are executable either from the script file or from a testplan
•Are also referred to as generalized testcases
•Can be created in one of two ways:
- Standalone technique
* Footnote
Source:Sources 10/7
External File Method
Unit of measure
•Uses the same testcase format as any record driven testcase
•Uses data stored in an external file instead of from a testplan
•Needs a data function to parse the data from an external file
Note: Because the data is stored externally, a function may be created to
read the data and run the testcase
* Footnote
Source:Sources 11/7
A Standard Testcase
Unit of measure
•Is limited in its usage as the data is coded directly into 4Test statements
•Can be converted into a data driven testcase because it has data and data
types which can be stored in a record format
A Record
•May contain any number of fields, which may be of different data types
•Must be declared outside a function
* Footnote
Source:Sources 12/7
Data Driven Testcase
Unit of measure
•Is associated with an external data source such as a flat file, spreadsheet
or database
•Can be executed against a specified set of records in a data source
* Footnote
Source:Sources 13/7
An External Data File
Unit of measure
* Footnote
Source:Sources 14/7
A Data Function
Unit of measure
* Footnote
Source:Sources 16/7
Error Handling
Unit of measure
•The recovery system scripts are located in defaults.inc, which is in the
directory where you installed SilkTest.
•You can write functions that override some of the default behavior of
the recovery system.
•You may want to handle errors locally and log errors and warnings in
the results file under script control.
•When a testcase uses its own error handling logic that does not call the
recovery system, it can pass, even though an error has occurred
* Footnote
Source:Sources 17/7
4Test statements used to handle or raise exceptions
Unit of measure
* Footnote
Source:Sources 18/7
Options Set
Unit of measure
•Is a file that contains settings to run SilkTest
•Must be opened in order to be used in your project
•Can be identified as the one that is currently loaded when its name
appears in the SilkTest title bar
•Can be passed along to other team members to ensure consistency in the
testing process
* Footnote
Source:Sources 19/7
Set Recovery System
Unit of measure
•Is used to identify the starting point (Base-State) of the application you
are testing
•Updates the Use Files field on the Runtime Options dialog with the path
to the executable for the application
Note: The Recovery System will return your application to its BaseState,
before running a testcase, during a testcase if an error occurs and after
a testcase completes.
* Footnote
Source:Sources 20/7
The Frame File
Unit of measure
•Contains the path to the application's executable file for the SilkTest
recovery system to use while running testcases
•Will initially hold a window declaration only for the starting
page/window
* Footnote
Source:Sources 21/7
Help Topics
Unit of measure
•Is used to get more information than the Library Browser provides
•Allows you to copy and paste examples into your testcase
* Footnote
Source:Sources 22/7
Looping Statements
Unit of measure
* Footnote
Source:Sources 23/7
Branching Statements
Unit of measure
* Footnote
Source:Sources 24/7
Unit of measure
* Footnote
Source:Sources 25/7
How To Handle A Login Window
Unit of measure
•Record a window declaration for the login window
•Record an Invoke method to handle the login window
•Modify the Invoke method to include a derived keyword
•Add the login widow's name to the wStartup constant in the Main
Window's window declaration
* Footnote
Source:Sources 26/7
Unit of measure
* Footnote
Source:Sources 27/7