Overview of Silk Test

Posted on Jan 25 2008 - 2:31am by Raj

SilkTest provides extensions for testing applications that use non-standard controls in specific development and browser environments. 

Contents

  • General Glossary
  • Source Files
  • Enable Extensions for Applications Under Test
  • The Recovery System
  • Main Menu Introduction
  • How to Record a Testcase
  • Record an Application State
  • Note for Application State
  • Using the Data Driven Workflow
  • Additional Task

General Glossary
Test Frame File:
Contains all the data structures that support your scripts: window declarations, user-defined classes, utility functions, constants and variables, as well as other include files

TestCase

A testcase is an automated test that addresses one objective of a testplan.       In a script file, it ideally addresses one test requirement. In a test plan,
it’s a keyword whose value is the name defined in a script file.
      Two Types of Testcases:

  • Level 1 tests, often called smoke tests or object tests, verify that an application’s GUI objects function properly.
  • Level 2 tests an application feature.


Testplan

      In general, a document describes test requirements.
Suite
     A file that names any number of 4Test test script files. Instead of running each script individually, you run the suite, which executes in turn each of your scripts and all the test cases it contains.
Project
     Organize all the resources associated with a test set and present them visually in the project explorer.

Identifier
     Name used in test scripts to refer to an object in the application. Logical, GUI-independent name. Identifier is mapped to a tag in a window declaration.

Tag
     Object’s actual name or index as it appears in the GUI.  The name by which SilkTest locates and identifies objects in the application.

Base State
     In order for a testcase to be able to function properly, the application must be in a stable state when the testcase begins to execute. The stable state is called the base state.
Application State
     An application state is the state you want your application to be in after the base state is restored but before you run one or more testcases.
Source Files
    When you package a project, SilkTest includes all of the source files, meaning the related files used by a project, such as:
   Description                 Extension
   plan files                     .pln
   script files                    .t
   include files                 .inc
   suite files                     .s
   results files (optional)      .res and .rex
   data files                       –
   data driven files               .g.t

Enable Extensions for Applications Under Test

SilkTest provides extensions for testing applications that use non-standard controls in specific development and browser environments.

Two Ways of Extessions Enable

  • By clicking “Tools/Enable Extensions” to have SilkTest automatically set your extension. (Generally recommended for junior user)
  • Select “Option/Extensions…” and enable extension manually.

The Recovery System
The recovery system is responsible for maintaining the base state in the event the application fails or crashes, either during a testcase’s execution or between testcases.
To restore the application to the base state, the recovery system contains a routine called DefaultBaseState that makes sure:

  • The application is running and is not minimized
  • All other windows (for example, dialogs) are closed
  • The main window of the application is active

Main Menu Intorduction
How to Record a Testcase
Step 1: Setting up the test
Step 2: Record the setup stage of a testcase
Step 3: Record the verification stage of a testcase
Step 4: Record the cleanup stage and paste the recording

Step 1

  • Enable extensions
  • Configuration recovery system
  • Select “Record/Testcase” and name “testcase”
  • Select “DefaultBaseState” and start recording.

Step 2

  • Interact with the application.
  • To temporarily suspend recording, click “Pause” button
  • To resume recording, click “Resume” button
  • Finishing recording, click “Done” button to review what you have recorded.

Step 3

  • Position the mouse cursor over the object.
  • Look at the Record Status window and make sure it is listing the object you want to verify.  If so, press Ctrl+Alt. The Verify Window dialog appears over your application window.

Step 4

  • Click “Done” button to finish recording
  • Click “Paste to editor” and select “Paste testcase and update window declaration(s)”. SilkTest will create window declarations for new objects
  • Click “File/Save” to save the script file

Recording an Application State

  • Open the file in which you want to place the application state
  • Open the application you want to test
  • Select “Record/Application State”
  • Name it and select an application state from the Based On drop-down list
  • Click the “Start Recording” pushbutton and click “Done ” to finish.

Note for Application State
    A testcase can have, at most, one application state associated with it. However, that application state may itself be based on another previously defined application state.
    If a testcase is based on a single application state, that application state must itself be based on DefaultBaseState in order for the testcase to use the recovery system. Similarly, if a testcase is based on a chain of application states, the final link in the chain must be DefaultBaseState.
Using the Data Driven Workflow
      Before you begin to create and run data driven testcases, you need to:

  • Create a standard testcase
  • Set up and identify the existing data source with the information you want to use to run the test
  • Configure the data source name(DSN), if you are not using the default(Segue DDA excel)


Then you can start using the data driven workflow:

  • Select a testcase to data driven
  • Find and Replace Value
  • Run the data driven testcase

Additional Tasks

  • Record a basic testcases with “Testapp”.
  • Record an application state
  • Use the Data Driven Workflow
About the Author

Leave A Response