Silk Test - Steps To Get Started

By Anand Ramdeo on May 4, 2011 Comments

This article in the series of tutorials for Silk Test gives step-by-step guide of getting started with test automation using Silk Test. In this article we will describe how to identify test cases for automation, create a test plan in Silk Test, Recored a Test Frame, execute and analyze results.

Normally, following steps are involved in start writing automated test cases in SilkTest

  • Identifying the test cases for automation
  • Complexity involved
  • Bandwidth available
  • Tool capabilities
  • Value obtained, by automating

First step in automation should be to figure out which test cases you would like to automate? Answer to this question will be based on your project attributes like

Creating a Test Plan

Once you have identified the test cases, you can organize them in the form of test plan. Test plan editor provided by Silk can be used for this purpose. Test plan is a hierarchical structure and contains information about the test cases and their description. Test cases present in the plan are linked to the test cases present in the .t files. These test plan can be organized in the way your testing efforts are organized. In most of the cases, test plan contains all the test cases for one particular functionality. You can also have sub test plan to organize it at a more granular level.

Recording a Test Frame

After identification and organization of test cases, next step is to identify GUI involved in these test cases. Silk test identifies GUI items as object and it should be present before writing test cases. These GUI objects are called Test frame in Silk Test terminology. These test frame contains description of GUI object in your application called window declaration. In window declaration, every GUI object is assigned a logical, cross-platform name. This logical name is related to actual object by various attributes called tags. SilkTest identify every object uniquely with the help of these tags and in our script mostly, logical names for the tags are used. In the newer versions of SilkTest same thing is called GUI Test map instead of Test frame. SilkTest also supports regular expression that can be used in tags for objects which are dynamic in nature.

Creating Test cases

For every test case, essentially you need to follow these four steps

  • Reach to the base state from where your test case begin
  • Follow the test case procedure and reach to the verification points
  • Verify application behavior with the help of verification points
  • Return application to the original state.

These steps can be recorded or manually scripted in the 4Test scripting language in the .t files. Mostly, you will start with recording and extend it using 4Test language.

For first step, SilkTest provides an excellent mechanism in the form of appstate(). In the test case definition, you can specify that this test case is based on this initial state. It is similar to calling a function before starting the test case, but in a much cleaner way.

Running Test cases

Test cases in SilkTest can be executed in many ways. It can be executed from .t file, or a specific portion of plan file or it could be from test suite which is a collection of various test plans and scripts. Test cases can also be executed from command line. After execution, test results are stored in the .RES format or in MS SQL and are available for the analysis.

blog comments powered by Disqus
Finished reading? Browse all posts »