Exforsys.com
 
Home Tutorials Testing
 

WinRunner - TSL Functions

 
This article explains about Types of TSL Functions like Analog functions, Context Sensitive functions, Standard functions and Customization functions.

WinRunner - TSL Functions Introduction:


TSL stands for “Test Scripting Language”. The test scripts are written in Test Scripting Language in winrunner. TSL is an enhanced, C-like programming language designed for testing. The advantages of TSL are:
 
 
1. It is easy to use.

2. It is similar to other programming languages. So a person who is in touch with basic concepts of programming can write test scripts easily.

3. It is a high level language.

4. The language provides various types of functions, which makes scripting easy.
 


Types of TSL Functions

 
Four basic types of Functions exist in Test Scripting Language.

• Analog functions
• Context Sensitive functions
• Standard functions
• Customization functions

All these functions can be used in winrunner whereas they are not available in some other automation tools.
 

Analog Functions

Analog functions record and execute operations at specified screen coordinates. When you record in Analog mode, these functions are used to depict mouse clicks, keyboard input, and the exact coordinates traveled by the mouse. When you run a test, Analog functions retrace the mouse tracks and exactly resubmit the input you recorded. Analog functions also support different test operations such as synchronization, verification, and text manipulation.

The analog functions can again be classified bases on their operation. The various analog functions available are:

Bitmap Checkpoint Functions:
check window - Compares a bitmap of an AUT window to an expected bitmap.

Input Device Functions:
Click, get, move, mtype, type are the various input device functions.

Synchronization functions:
wait window is an example of synchronization functions.

Table Functions:
Various table operations can be performed through these functions. Classic examples of table operations are clicking a table cell, double clicking a table cell, dragging a table.

Text Checkpoint Functions:

Click on text, find, get, move locator to a specified text are some of the examples of text checkpoint functions.
 
 

Context-Sensitive Functions

 
Context Sensitive functions depict actions on the application under test in terms of GUI objects (such as windows, lists, and buttons), ignoring the physical location of an object on the screen. In Context Sensitive mode, each time you record an operation on the application under test (AUT), a TSL statement is generated in the test script which describes the object selected and the action performed.
 
 
Different context-sensitive functions can be summarized as follows:

• Active Bar Functions
• ActiveX/Visual Basic Functions.
• Bitmap Checkpoint Functions
• Button Object Functions
• Calendar Functions
• Database Functions
• Data – driven test Functions
• GUI related Functions
• Java Functions
• List and Menu object Functions
• Oracle Functions
• WAP Functions
• Web Functions, etc.
 
 
 

Standard Functions


Standard functions include the general elements of a programming language, such as basic input and output, control-flow, mathematical, and array functions. By combining these elements with Analog and Context Sensitive functions, you can transform a simple test into an advanced testing program.
 
 
 
The various standard functions can be summarized as follows:

• Arithmetic Functions
• Array Functions
• Call Statements
• Compiled Module Functions
• I/O Functions
• Load Testing Functions
• Operating System Functions, etc.
 

Customization Functions

 
Customization functions allow you to enhance your testing tool so that it better supports your specific needs. For example, you can add functions to the Function Generator, or create custom GUI checkpoints.

The various customization functions are:

• Custom Record Functions
• Custom User Interface Functions
• Function Generator Functions
• GUI Checkpoint Functions

Read Next: Testing Types



 

 

Comments


dbuyyani said:

  It is good and more explanatory
October 18, 2005, 12:13 am

vineela said:

  :-\\sir u have to explain with more different examples
July 15, 2006, 6:50 am

vineela said:

  :-[What should one do when there is no recording of the context sensitive for adobe photoshop or image ready???
July 15, 2006, 6:53 am

Pandu said:

  You explained very well.
October 5, 2006, 9:45 am

Sameet Damle said:

  Respected Sir/Madame,

Define the problem:

Scripts that are running without any problem invariably run into problems after a few hours or next day onwards.
We tried to use various synchronization techniques suggested by you but still we could not fully stabilize the scripts(using sync checkpoints, wait, web_sync, etc).

The web_sync statement is inserted by WR depending upon the sync requirements at a given point of time. Please suggest how we could manipulate the web_sync argument to make it run correctly again at any given point of time.

Kind Regards,

Sanjay Dixit and Sameet Damle
November 22, 2006, 11:59 pm

S BHUVANESHWARAN said:

  dear sir,
Thank you very much for the good introdution about the TSL comments.
But we need little bit more topics from you.
Please do the neccessary.
Thanks & Regards,
S Bhuvaneshwaran
December 25, 2006, 11:16 am

lavanya03sr said:

  sir,

i want TSL for Synchroniztion concepts with examples..like by taking calculator application.(object/window,object/window bitmap,screen area)
March 4, 2007, 11:57 pm

lavanya03sr said:

  sir
can u explain tsl script writting by taking simple application like calculator for Checkpoints
March 14, 2007, 5:34 am

lavanya03sr said:

  sir,
Explain Checkpoints by taking one application like calucalator..show me a scripts
March 23, 2007, 6:19 am

Josephvatti said:

  Sir, can u explain TSL in QTP
May 6, 2007, 3:54 am

mandy said:

  Hi Josephvatti
Only VB script is used in the QTP so nobody can explain u in the TSL
Oplogies if I am wrong
May 7, 2007, 4:12 am

Rachana Parmar said:

  Sir, I Rachana Parmar, Software Test Engineer , want to know in brief Exception Handling concept in QTP.
So, can anybody explain me what exactly I have to do for that?
June 19, 2007, 1:11 am

mavrick said:

  ok exception handling is nothing but how we handle wrong things in our real life.
got it Rachana Parmar.
by the way in which company u r? bol
July 6, 2007, 4:10 am

vijayakuma said:

  hi
can you explain how to run tsl scipt in winrunner and then explain how to use load functions
July 29, 2007, 11:28 pm

Name said:

  What is Full Explanation is TSl?
October 9, 2007, 6:31 am

padmaja14 said:

  hi
at present checkpoints used in companies
October 29, 2007, 6:05 am

cbueche said:

  http://emos-framework.sourceforge.net/
December 17, 2007, 11:40 am

amit puranik said:

  yes it is good.but i think there must some Example about the functions and how to use.
January 7, 2008, 2:05 am

sithu said:

  Hi,

Can anybody tell me how to perform regression testing if we do not have the business requirement document ready?
February 17, 2008, 10:51 am

Salman Shahid said:

  Sir could you explain the whole testing procedure in particular with QTP
March 14, 2008, 6:59 am

Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2009 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape