Subscribe by Email


Showing posts with label TSL. Show all posts
Showing posts with label TSL. Show all posts

Wednesday, January 2, 2013

What is Selenium software testing framework?


Selenium software testing framework is portable frame work that has been developed exclusively for the development of the web applications. It actually works as a record and play back tool for the guiding of the tests without having to learn about a TSL or test scripting language. 
The selenium software testing frame work comes with its own test domain – specific language known by the name of selenese which can be used for developing tests in a no. of prominent programming languages such as the following:
  1. C#
  2. Java
  3. Groovy
  4. PHP
  5. Perl
  6. Python
  7. Ruby etc.
The tests thus developed can be executed against a number of modern web browsers. The selenium frame work can be deployed on the following three platforms:
  1. Windows
  2. Linux
  3. Macintosh
- Selenium is one of the best open–source software that are available to us today. 
- It was released as an OSS under the license – apache 2.0 and so you won’t be charged for downloading and using it.
- The software got its name for a joke cracked by Jason in an email in which he mocked his competitor by saying that he can cure mercury poisoning with the help of supplements from selenium. 
- The other people who received this email began using this name and eventually the software was named so. 
- The selenium grid represents the latest side project which is known to provide a hub enable execution of the multiple selenium tests on a local and remote system and that too concurrently. 
- This is being done as an effort to minimize the time taken for execution. 
- The selenium provides you with a number of robust tools which one use for the rapid development of the automated tests for testing the web based applications. 
- Plus, it also comes with a number of rich features and functions which have been exclusively for designing the web applications. 
- The operations which are carried out by the selenium framework are highly flexible in nature and allow for the location of the UI elements with supported by a number of options. 
- Also, the selenium frame work accounts for comparing the actual and the expected test results. 
- Selenium’s key feature lies in the support it provides for the execution of one test on a number of browser platforms. 
- The selenium frame work is composed of three major tools each of which plays an important and unique role in the development of the tests for web applications:
  1. Selenium IDE
  2. Selenium remote control
  3. Selenium grid
- There are number of ways in which functionality can be added to the selenium’s frame work to further customize the tests in order to suit one’s specific needs.
- This characteristic that makes the selenium frame work outstanding among the rest. 
- The RC support from the selenium assists the test writes in multiple programming by helping them develop any logic they require for automated testing by using their preferred language. 
- On the other hand, the user can add his own defined extensions via the selenium IDE for creation of additional customized commands. 
- The selenium RC code generated by the selenium IDE can be reconfigured easily which lets the testers generate code that would fit their testing frame work. 
- Also, since the selenium is open to all, all are free to submit their contributions for its enhancement and modification. 


Tuesday, September 4, 2012

What are User Define Functions? What are all the different types of User defined functions? (In WinRunner)


The testing capabilities of the winrunner can be extended further by letting the user create his own TSL functions. The TSL functions thus created can be used in a compiled module as well as in a test. 

Apart from just providing the built in functions, the TSL allows you to do the following:
1. The user defined functions can be defined by the user. After defining the function once in the test script, it can be called from anywhere in the tests.
2. The user defined functions can be defined by the user for compiled modules. Once that particular gets loaded, the functions it holds can be called from anywhere.
3. These user defined functions can be called from anywhere in the Microsoft API and other external DLL functions as well.

- The user defined functions are used when it is required to perform the same operations several number of times. 
- Instead of repeating the same code again and again, a single function can be written that will perform the same operations a number of times. 
- This has the following benefits:
  1. It makes your test scripts more modular.
  2. It makes your test scripts more readable.
  3. It becomes easier to maintain the code and debug it.

What are User Defined Functions?

- A user defined function because of being incorporated in to the compiled module can be accessed from any where. 
- At the same time the time taken for the execution is reduced since the compilation of the function is done in the earlier stages only. 
- Below stated is the typical declaration for a user defined function:
[class] function name ( [mode]  parameter.... )
{
Declarations;
Statements;
}
- The class of the function can either be public or static. 
- Whenever a static function is declared with static class it is made available to the module or the test within which that function lies. 
- Once a function with a public class is executed, it is made available to almost all the tests for the time till the test holding that function remains open. 
- This seems to be the most convenient option when it is required that the function should be accessible from all the tests. 
- However if the case is as such that it is required that many tests should be able to access the function, then the function has to be placed in a compiled module. 
- Whenever a function is placed in the compiled module, it becomes accessible until the duration of the testing session ends. 
- Unlike the class, there is no need of declaring the parameters explicitly. 
Parameters can possess any one of the following modes:
  1. In: in this mode the value is assigned from outside the function.
  2. Out: in this mode the value is assigned from inside the function.
  3. Inout: in this mode the value can assigned either from inside or from outside the function.

Types of User Functions in WinRunner

Now let us state all are the types of user defined functions:
  1. Scalar functions
  2. Multi- statement table valued functions and
  3. Inline table valued functions
- A user defined function may consist of either zero parameter or more then that.
- The function may return either a table or a scalar value.
- However, the input parameters have a limit of 1024. 
- If the function is to be driven with the default values then the key word DEFAULT must be specified while you call the function. 
- This key word is added in order to get a default value for the user defined functions. 
- In some cases if you omit the parameters then the parameters are treated to be default values. 


Friday, August 31, 2012

What is TSL? What 4GL is it similar too?


TSL and 4GL are two major languages that are coming in to the scenario of the present world programming languages. What do you mean by a test script actually? 
Test scripts form a set of instructions that in turn can be performed on some software system or application under test for checking whether or not the functions are giving the desired output i.e., if they are working properly or not. There are two ways via which these test scripts can be executed as mentioned below:
  1. Manual testing and
  2. Automated testing
In this article we shall discuss regarding the test script language or TSL and fourth generation language or 4GL. First let us start our discussion with the test script language. 

About Test Script Language

- The Test script language lies at the heart of the integrated testing environment created by the mercury interactive.
- Test script language is categorized under the category of high level languages. 
- Its usefulness is born out of the combination of the flexibility as well as the power of the conventional programming languages and functions that have been developed as a tool or a feature to be used along with the products of the mercury interactive like winrunner and test director. 
- Also, this feature of the test script language has made it to be used for the modification and programming of the sophisticated test suites. 
- The functions that the test script language provides have been grouped in to the following four categories:
  1. Analog functions
  2. Context sensitive functions
  3. Customization functions and
  4. Standard functions.
- All of the above mentioned functions do not come with all the mercury interactive products. 
- Winrunner is one such mercury interactive product which supports all of these functions. 
- Apart from just the built in functions the test script languages gives its users the provision of creating their own functions.

What are Fourth Generation Languages - 4GL?

- A fourth generation programming language needs not necessarily be a language only it can also be a programming environment. 
- The 4GLs have been developed with a certain set of design patterns in mind and are assigned a specific problem domain. 
- 4GLs were developed as a succession to the 3GLs and are known to define a higher trend of statement power as well as abstraction. 
- It was observed that the 3GL languages were quite slow and much prone to errors. 
- As a result of the efforts to overcome this problem, the 4GL languages were born and these were more focussed towards aspects like:
     1. Systems engineering
     2. Problem solving and so on.
- The fourth generation language was designed as such that they cut down on the following: 
     1. programming efforts,
     2. Time consumed in development and of course
     3. The cost of the software development.

- However, in some of the cases, a try at achieving all this resulted in an ineffective and unmanageable code. 
- A formal definition of the 4GL was given by John Capers in terms of developer productivity (i.e., in terms of function points per staff month). 
- 4GL languages are said to support 12- 20 function points per staff month. 
- The 4GLs are a subset of domain specific programming languages has been stated a number of times by some researchers. 
- 4GLs have been classified in to 4 types as stated below:

1.Table driven programming (codeless): Uses table driven algorithm. Example: power builder.
2. Report generator programming languages: Generates the required report.
3. Fourth generation environments or more ambitious 4GLs: Specialize in generation whole system from output of CASE tools.
4. Data management 4GLs: such as-
             a)   SPSS
             b)   SAS
             c)   Stata


Thursday, August 30, 2012

What is a Module? What is a Compiled Module? (In WinRunner)


Modules are the basic elements of any software system or application that make up the foundation of that software system or application. In winrunner usually the term “compiled module” is used. We shall see in this article that what are the compiled modules and how they can be created in winrunner. 

What are Compiled Modules?

- Compiled modules store the frequently used functions and so are considered to be a kind of libraries. 
- In compiled modules, the functions defined by users i.e., the user defined functions can be stored and later these stored user defined functions can be called from the test scripts. 
- Compiled modules are considered to be a library since they are actually a script containing all the user defined functions which are required to be called many times from other tests. 
- Whenever a compiled module is loaded, the functions that it contains are subjected to automatic compilation and reside in the memory itself. 
- After this, they can be called directly and from within any test. 
- With the compiled modules, the performances as well as the organization of the tests that you create are improved significantly.
- This happens so because the compiled modules are debugged before they are used and therefore the tests that we created require very less error- checking. - In addition to all this, the interpretation of a function in a test script is quite slower than the calling of a function that has already been compiled.

There are 2 ways available for compiling a module as mentioned below:
  1. Loading the module to be compiled from a test script with the help of the TSL load function.
  2. Running the script of the module to be compiled with the help of the winrunner run commands.
- The step commands can be used for performing the incremental compilation if in case you need to debug or modify an already existing module. 
- After this, the part of the compiled module that you made changes to needs to be run so that the entire compiled module will be updated. 
- It is necessary that the user defined functions present in your compiled modules are automatically compiled every time the winrunner starts up. 
- For this you need to add load statements top the start up tests. 
- However, you should know that for loading the recovery compiled module there is no need for adding the load statements to the start up tests or any other tests.
- This is so bacuse the recovery compiled module loads by itself when the winrunner is started. 
- Another point to be taken care of is that the compiled modules cannot load the GUI map files when you are working in the GUI map file per test mode.
- If the compiled module has to make references to any of the GUI objects present in the application software then it is required that the referred GUI objects must also be referred in the test which is responsible for loading that particular compiled module. 
- Like a regular TSL test the compiled module can be opened, edited or saved.  - However, there is a big difference in the contents of a compiled module or ordinary tests. 
- Like a regular test, a compiled module does not contain any analog input or check points. 
- This is so because a compiled module is designed to store user defined functions rather than just performing a test. 
- The purpose why it stores all the frequently user defined functions is to speed up the execution process by providing a quick and convenient access from the other tests. 
- Its contents are:
  1. Function definitions and declarations,
  2. External functions prototypes
  3. Load statements etc. 


What are the other codes you can write/call with in TSL?


TSL or test script language is the sole language of the winrunner i.e., it is the only language in which the winrunner test scripts are generated. One requires a deep knowledge of TSL so as to create highly sophisticated test scripts. 

A good knowledge of the language also cut downs on the need of the manual intervention. A small number of keywords and operators make the TSL language quite compact. Proficiency in languages like C and C++ will make it easier for you to deal with TSL language. 

The TSL language being a script language has a very simple syntax structure when compared to other programming languages. This feature of TSL adds to its both advantage and disadvantage. The advantage is that it is as easy as a wink to learn because of a less complex structure and the disadvantage is that being so simple reduces its capabilities. 

Below mentioned are the features of the TSL language that can be used to write the code:
  1. Comments
  2. Naming rules
  3. Data types
  4. Data storage
  5. Operations
  6. Branching
  7. Functions and
  8. Loops.
Knowledge of other languages like following also adds in quick learning of TSL:
  1. Java
  2. Perl
  3. JavaScript etc.
- The QTP codes that are written using the HP’s quick test professional can be written or called in TSL language also. 
- The reverse is also possible i.e., the code written in TSL can be migrated in to QTP format. 
- The other codes thus written using TSL language usually sever less time turnaround but it largely depends on the degree of the complexity of the code as well as the process.
- Winrunner provides a shareable environment in which users can organize, write and maintain a set of automated test cases as well as supporting software libraries. 
- The winrunner along with TSL provides a perfect tool box for the creation of a testing frame work but the responsibility to build the right frame work lies in the hands of the user. 
- Winrunner provides a good software development environment that caters to all the needs of the test automation engineers. 
- The TSL can be considered to be a simplified version of C language or one of its derivatives since it does looks and feels like C language. 
- Test automation engineers who are quite experienced with C take less time and face little difficulty in becoming proficient with TSL language. 
- The organization of the TSL code depends largely up on the skills of the test automation engineers. 
- They must organize and maintain the code base.
- The winrunner comes with a large number of automation wizards which aid in every process of test automation. 
- Even though the winrunner meets all the needs of the testing organization, it is required that an additional development paradigm and testing frame work must be implemented with it. 
- This is necessary because otherwise the values obtained from the test automation will be lost in the due course of maintenance.
- The web, GUI, .NET and java codes can be written and called with in TSL and can also be verified. 
- TSL language is a standard start up script that is easily invoked during the start up of the winrunner. 
- The TSL codes are used for the standardization of several operational aspects of the winrunner like the following:
  1. Standard functions
  2. GUI map configurations
  3. Shared scripts
  4. Shared libraries and so on.
- There are a hundred functions that TSL provides for various uses categorized under various groups and categories namely:
  1. Analog
  2. Context sensitive
  3. Customization and
  4. Standard.


Wednesday, August 29, 2012

What are all the different languages that can be called using TSL in between the scripts?


A suite of manual test cases was developed by some of the organizations with the help of text editor which was found to be quite difficult to be used, maintained and executed as efficiently as in the case of other test cases. 
These test cases prove to be quite effective in detecting the defects before the production phase starts but consume more time in their management and execution and thus affect the investment terribly.
This problem becomes graver as the role of the organizations grows. The only solution to this problem is the investment in a sound test automation tool. 

Winrunner is such a test automation tool whose core language is the TSL or “test script language”. 
The three basic needs of the test automation engineer are addressed by the winrunner and TSL both namely:
  1. Management and organizational needs
  2. Test architecture
  3. End user

What are the features of WinRunner?

The winrunner possesses the following features:
  1. It enables the users to author, organize and maintain a set of automated test cases.
  2. Provides a web enabled and shareable environment.
  3. It supports test case design.
  4. Provides automation
  5. Supports execution of the best practices (that have been defined the test organization).
  6. It serves as a tool box for building a testing frame work.
All the facilities are provided by the winrunner, now the responsibility of building a test frame work lies solely with the test automation engineers. 

What is TSL? What languages can be called through TSL?

- Winrunner is driven by the test scripts created in the language TSL.
- Test script language is a programming language which is quite close to the C programming language.
- Most of the features of the test script language resemble the features of the C programming language though it is quite simple than C programming language.
- The test automation engineers who are quite experienced with the languages such as C do not find it much difficult to master the test script language. 
- The organization is responsible for the maintenance and organization of this TSL code base.
- Few of the different languages that can be called using the test script language in between the scripts are:
  1. Web scripts
  2. GUI
  3. >NET
  4. Java
  5. Javascript
  6. HTML and so on.
- With the test script language the integration of other tool sets is also possible and is done via some API. 
- TSL actually comes in to play whenever the user records a test. 
- The default code that is generated in the winrunner window is in test script language only. 
- This script written in test script language is saved as some script file. 
- The TSL language apart from just creating the test scripts also combines functions developed from some specific purpose for the test in some other language that has got TSL like features like control flow statements, variables, arrays and user defined functions.
- Another good thing about test script language is that there is no need to compile it. 
- The scripts can be immediately executed just after they have been recorded. - Four types of functions are provided by the test script language as stated below:
  1. Analog functions
  2. Context sensitive functions
  3. Standard functions and
  4. Customization functions.
- Not even just language codes and functions but also the whole application written in a different language can be invoked in between the scripts with test script language.  
- This is actually done via the function “invoke_application” that is defined using test script language only. 


Thursday, August 23, 2012

What are different types of functions available in WinRunner?


Functions form a very important aspect of the winrunnner. When you work with the winrunner you are provided with functions from all the categories. 

Some of the functions are there which are suppose to work only when the applications have been developed in specific environments like those mentioned below:
  1. Visual basic
  2. Power builder and so on.
What is a Function?
- The availability of a specific function can be checked by clicking up on the availability button available at the top of the help screen for that particular function. 
- The loadrunner GUI vusers types make use of the winrunner for the creation of the system load.
- This makes it possible to make use of any of the categories. 
- The standard functions can be used apart from the loadrunner functions in loadrunner scenario scripts on UNIX platform only.
- There are certain TSL functions that have the support for both the Xrunner and winrunner. 
- The winrunner provides 4 major types of TSL functions as stated below and a different and unique requirement is addressed by each of them:
1. Context sensitive functions: These functions hold the responsibility for performing the operations on GUI objects.
2. Analog functions: These functions hold the responsibility for carrying out some user like events like mouse and key board input.
3. Customization functions: These functions hold the responsibility for configuring the settings of the testing tool according to one’s requirement. 
4. Standard functions: These functions hold the responsibility for performing the basic programming language operations.

Context Sensitive Functions
- The actions taking place on the software system or application which is under test can be depicted by these functions in terms of the GUI objects like buttons, lists and windows and so on. 
- These functions are available for the following platforms:
      a)   Winrunner
      b)   Load runner GUI vusers
   - Parameters that make a reference to the logical name of some object are involved in most of the context sensitive functions. 
   - However, it should be checked that the logical name of an object has been given a place with the physical description. 
    - What happens during recording is that the logical name is automatically put to use by the system. 
   - In some cases the function is expected to work with the physical description of the object as well.

    Analog Functions
   - Operations are recorded and executed at the screen coordinates of the screen as specified in the test script. 
   - When the winrunner recording is done in this mode, these functions come in to play for depicting the following:
a)     Mouse clicks
b)     Key board input
c)     Exact coordinates travelled by the mouse
- The purpose of these functions is to run and retrace the mouse tracks and submit the exact input that was recorded by the user. 
- There are some other particular operations that are supported by analog functions:
a)   Synchronization
b)   Verification
c)   Text manipulation etc.
- The analog functions are available for the same platforms as for the context sensitive functions.

Customization Functions
- With these functions, the testing tools you are using can be enhanced further to suit better with your testing style and other specific needs. 
- One particular example for this function is the function using which functions can be added to the function generator and custom GUI check points can be created. 
- These are only available for winrunner.

Standard Functions
- These functions are for general elements of the programming language like:
a)   Basic input and out put
b)   Control flow
c)   Mathematical functions
d)   Array functions and so on.
- Unlike other function the standard functions are available for all the products of mercury interactive.  


Wednesday, August 22, 2012

When do you use Verify/Debug/Update Modes? (in Winrunner)


After you have developed the test scripts and finalized your test case, your next step is to run that particular test in order to check the behaviour of your software system or application. Whenever a test is executed using the winrunner, line by line the whole test is interpreted by the winrunner.  
As the TSL statements are interpreted line by line they are marked by an execution arrow which is visible in the left margin of the test script. As the test continues to be executed your software system or application is executed as if it is being controlled by a person. 

The winrunner provides 3 modes for the running your tests namely:
  1. Verify run mode
  2. Debug run mode
  3. Update run mode
In this article we talk about the above mentioned three different types of winrunner run modes. 
- The first mode i.e., the verify run mode checks the application. 
- The second one i.e., the debug run mode debugs the test scripts.
- The third one i.e., the update run mode updates the expected results. 
- Only two modes i.e., the debug run mode and the verify run mode are available when you are using the winrunner run-time.
- Any one of these modes can be chosen from the list on the test tool bar. 
- The verify run mode represents the default run mode in winrunner. 
- You can either run the entire test or just a portion of it using the test and debug menu commands. 
- But always make sure all the necessary GUI map files have been loaded before you start with a context sensitive test. 
- You also have the choice of running individual tests or a group of tests using a batch test. 
- Batch test seems to be quite useful when you have very long tests to be executed and you need an overnight run. 

Now we will discuss about all the three run modes in detail one by one:
Verify run mode: 
- In this mode the current response of your software system or application is compared to the expected response by the winrunner.
- The results of this run mode are called verification results and enlist all the discrepancies that might have been observed in the current response and the expected response. 
- When the execution of the test stops, the verification results window is by default opened for the user to see. 
- As many sets as required of the verification results can be obtained. 
- However, you should always be ready with the expected results for the check points that you created earlier. 
- If there is any requirement for updating the expected results you just need to run the test in update mode.

Debug run mode: 
- This mode also helps in rooting out many of the bugs that might be residing in a test script. 
- The execution of a test in verify mode as well as debug is almost same, the only difference being in the folder in which the results are saved. 
- In this case the test results are saved in the debug folder. 
- Also, here only one set of debug results is stored and so the folder does not opens automatically for the user to view. 
- In this mode, the thing to be taken care of is that the time out variables must be changed to zero while the debugging 0of the test scripts take place.

Update run mode: 
- This mode helps in the updating of the expected results as well in the creation of a new expected results folder.
- Results for a GUI check point can also be updated and an additional set of expected results can also be created. 


Facebook activity