Blog to understand automation concepts in QTP, Selenium Webdriver and Manual Testing concepts

VB Script tutorial - Variables, Constants and Arrays

VBScript is used extensively with QTP for creating test script. With articles on VBScript, I will try to explain the VBscript and refresh the concepts for my self knowledge.
In VBscript, variables of all the data types are declared with the same data type called as variant


A variable can be defined as Dim abc. We may or may not need to define the variable explicitly. If we require every variable used must be defined. we need to provide option explicit.
Using Option explicit is a good practice as it keeps a check on the variables used in the script

Some Important point to note about variable declaration are :

  • Variable for all the data type are defined as dim in vbscript
  • VBScript is not case sensitive, therefore variable abc and ABC are the same.
  • If Option explicit statement is defined, each of the variables used in the vbs file must be declared before use.
  • A variable must start with alphabet and should not exceed 255 characters
  • We can define variable everywhere in the script but it is best to define all the variable at the start of the function or script for better maintenance of variables
  • We can ignore standard naming convention by defining the variable within square bracket but should avoid this.
  • Multiple variable can be defined as Dim abc,def,qrtin 
We can also define an array variable, to store a set of values in a variable. An array can be one dimensional or multidimensional;'' For e.g. in below example we define the fixed size array, on trying on resize the array, it gives us error.
dim arra(5)
An array can be defined as dynamic array, we can resize the array then, below code explains how to create a dynamic array. Preserve is used to preserve value 
dim arrad() '' define a dynamic array variable without size provided
An variable defined at a function level can be used within the function in which it is defined. A variable defined at script level, can be used across the functions within the script. 
const abcd = 3

Option explicit
dim abc
abc = 3
msgbox abc



Dim [1Test 231]
[1Test 231] = "I have defined a variable not starting with alphabet and having a space in between"
msgbox [1Test 231]

An array can be a fixed size array defined as dim arra(5) , this will store 6 elements, but once defined the array size can not be modified. 


redim arra(3) 
arra(0) = 54 
msgbox arra(0)


redim arrad(3) '' Using Redim, we can define the size of the array. 
arrad(3) = 75  
redim preserve arrad(5) '' we use preserve the values stored on existing array using preserve as shown here. In this example we resized the array size to 5 and preserved the original value stored in array.
msgbox arrad(3)
We can also create multiple dimension array as dim arram(4)(5)(6).

In QTP, we can also define environment variable to be used across the actions.


Another type of variable in constant. A constant variable does not change its value once defined. Also value cannot to assigned to a constant post declaration of constant and its value

abcd = 43
msgbox abcd

Converting an existing project in Selenium to Maven Project in Eclipse

Maven can be integrated with eclipse IDE to manage build and deploy selenium or any java project in eclipse. In this article we will discuss on first step in Setting up existing project to maven project.

Installing Maven plugin in eclipse is simple and takes around thirty minutes to install. Below are simple steps to install maven plugin in eclipse.


  • Open eclipse and click on Help>Eclipse Marketplace



  • Search for maven in eclipse marketplace. Install Maven integration for Eclipse
  • Once maven is installed, restart eclipse.
  •  Go to workspace and right click on the project and click on configure as shown in screenshot below
  • Click on Convert to Maven Project.
  • A pop up to create a new Maven POM will appear.

  • Click on finish. A POM file will be created automatically.

You can set project dependencies in the POM file POM stands for "Project Object Model". It is an XML representation of a Maven project held in a file named pom.xml.


Once the project is set as maven project, we can perform various action in Project using maven as shown in screenshot below. We can also add selenium dependencies in the POM to manage selenium artifacts , which will be explained in next articles.






Understanding User Acceptance Testing

In software development, the application developed is tested by different teams. Developers perform Unit testing and Integration testing before passing the product to QA for their validations. QA Performs System Testing, SIT and regression testing on the product. Once the QA certifies the product, the Product is passed on to the client/UAT Team for User Acceptance Testi


Client/UAT Team before passing the product to the end users needs to verify if the product delivered to him is the same as requested or a different product is developed. The basis for testing is the requirements of client and product is developed as expected in the requirement. The product is passed on to client once the exit criteria between client and supplier is met which includes conditions of no major issues in the developed product by supplier.

Client on receiving the developed product tests the product internally if it is as per expectation and then passes the same to a subset of end users (beta users) to validate the product from end user point of view. Once it passes both internal customers testing and external customer testing (by beta users and can be called as beta testing), it is released to market to be used by customers or end users.

Entry Criteria for UAT testing is usually the exit criteria for System Testing Phase. Entry criteria for UAT testing includes in general:

  • No Major open defects in the product
  • Test Execution completed and sign off communication provided by System Testing team
  • List of Known issue provided.
  • Environment for UAT deployed.


Once Entry Criteria for UAT is met, the UAT team starts testing on the product. UAT can happen in two stages. In First stage, the testing is done by the UAT Team of the client. The focus or key aspect of testing is to validate the product is developed as per the requirement agreed between the stakeholders. To Test the requirements, business scenario needs to be identified and testing should focus on business scenario validations. Once UAT Team feels the product is as per agreed in requirements and there are no major defects in the product, the product can be provided to subset of targeted end users to know their views and feedback on the usability of the products before releasing it officially to the end users. It is important to know either of the two stages i.e. testing by UAT Team of client or subset of targeted end users can be skipped based on the product.

To understand this, beta testing by subset of the end users is very important for a shopping or social networking website. As it is very critical to know the actual end user needs and before releasing it to market. While if the application is an internal tool to be used by client itself, he can skip the beta testing.

Next Question is who the UAT testers are. UAT Testers are usually the subject matter expert with good in-depth knowledge of domain. UAT testers usually focus on real life scenario that can happen. For e.g. for a banking Lending application, it is important to have someone with prior experience in banking and specifically in Lending domain to drive the UAT testing and preparing plan for execution.

Once the UAT team completes User Acceptance testing on the product, it provides sign-off for the product to be released to production/Go-Live. And then it’s party time for all stakeholders involved in the application with finger-crossed for no defect identified in production. 


Signing off this post and publishing to end users of this blog. Feedback/suggestion must welcome.