Subscribe by Email


Friday, October 26, 2012

How to run the silk scripts?


Silk test as we know is a test automation tool from the Borland which was launched in the year of 2006. This tool facilitates the automated regression testing and functional testing. However, the credit for the original creation goes to the segue software.
Various clients are offered by the silk test as described below:
  1. Silk test classic: This client of the silk test makes use of the domain specific language called “4test” for scripting of the test automation scripts. This language just like the C++ language is an object oriented language. Just like C++ it also makes use of the Object Oriented concepts such as following:
a)   Inheritance
b)   Classes and
c)   objects
  1. Silk 4J: This client of the silk test enables one to follow test automation by using java as the scripting language in eclipse.
  2. Silk 4 net: This client of the silk test also enables one to follow test automation by using VBScript or sometimes using C# as the scripting language in the visual studio.
  3. Silk test work bench: This client of the silk test enables the testers to carry out the automation testing using VB.net as the scripting language as well as on a visual level.

What kind of files a silk script consists?

In this article we are going to see how the execution of the test scripts takes place in silk test.
-  A basic or a typical silk script consists of two files namely:
  1. Include file and
  2. Script file
- The include file of the silk script is saved with an extension .inc and is particularly for the declaration of the following:
  1. Window names
  2. Window objects
  3. Variables
  4. Constants
  5. Structures
  6. Classes and so on.
- The second file i.e., the script file contributes in writing of the scripts. 
- It is saved by the extension .t and is used for defining of the body of the scripts. 
- Test cases meeting the various test conditions are defined in this script. 
- The two different types of files have been used to maintain the clarity of the code as much as possible. 
- If the include file of the test script does not consists of any of the test cases then the file may be compiled but cannot be executed. 
- If tried for the execution an error will be generated saying that there are no test cases. 
- Only the include file which consists of some test case can be run. 
- Before you run the script always make sure that you make separate declaration for the files:
  1. For the declaration of the objects and
  2. For creation of the scripts using declaration file.

Steps for running Test Scripts

After the two declarations have been made you should proceed for their compilation. Below we are stating the steps that are to be followed for running the test scripts:
  1. Launch the silk test automation tool.
  2. Open the script file of the script to be executed.
  3. Compile the above script by using the compile option from menu bar.
  4. Once the compilation of the file is complete the status of the script can be checked by the progress status.
  5. Any errors present in the script will be displayed at the end of the compiling process.
  6. Now run the silk scripts by clicking the run option in the menu bar.
  7. For running the test scripts you have two options: either you can run all of them at a single stretch or you can run them selectively.
  8. If you have opted for the latter option then you need to specify which all tests have to be executed.
  9. After selection you can again give the run command. 


No comments:

Facebook activity