Skip to main content

Posts

QTP-Stroring Environment Variable In XML File

Objective:Login Action Parameterization By the Use of External Environment Variables the issue of Login Actions parameterization could be solved.Using this approach we can concurrently run scripts on different environments. How it Works: 1. Create AutomaticConfiguration.xml file with two variables namely AdminLogin,UserLogin in Local QTP Installation folder. 2. The Admin and User Login Actions Loads the AutomaticConfiguration.xml file from the above mentioned path. 3. The Login Actions use the Environment variables to Launch the Application. Steps To Create an XML File: 1. Open Notepad. 2. Type ENVIRONMENT on the first line (in opening and closing angular brackets) 3. Type each variable name-value pair within variable elements in the following format: For example, your environment variables file may look like this: 4. Save the file as AutomaticConfiguration.xml in quicktest install folder (\program Files\MercuryInteractive\QuickTestProfessional) in your Local Machine. You are d...

QTP Functions

QTP Functions ********************************************************************************** Function TimeStamp() iArr1=Replace(Now,"/","") iArr2=Replace(iArr1,":","") iArr3=Replace( iArr2,"AM","") iArr3=Replace( iArr2,"PM","") iArr4=Replace(iArr3," ","") iArr5=Cdbl(iArr4) iTimeStamp=iArr5-1000000000 TimeStamp=iTimeStamp End Function ********************************************************************************** Function TimeStamp(theDate) TimeStamp=DateDiff("s","01/01/1970 00:00:00",theDate) End function ********************************************************************************** How to use the below function in your Test Script ********************************************************************************** Set oObj=Browser("oBrowser").Page("oPage").Frame("oFrame").WebTable("oWebTable") Call...

ABC Of Estimation

1 WHAT IS ESTIMATION What we mean by term Estimation? How do we measure software? Well, we measure software in terms of its SIZE which can be LOC, FP etc. Sizing is the prediction of product deliverables needed to fulfill the project requirements. Estimation is nothing but the prediction of effort (resource) needed to produce the deliverables. Estimation is not 100% accurate at the early stages of the SDLC and as we move ahead our estimation become more accurate. We will see this more into coming sections. Below is a BIG picture of Software Estimation: Scope Defined -> WBS Created (All dependencies and task identified and created) ->Estimate the Software Size->Estimate the Effort (Cost) and Duration-> Assign Resources->Schedule the Work. 1.1 ESTIMATION MODELS In below section we will see some widely used Estimation Techniques. In this article we will not go into much detail of each Estimation technique but will give you a high level detail of each technique. ...

Database Knowledge for a Tester Part V

Hi Readers, this is the last series of DataBase Knowledge for a Tester. I hope you people must enjoyed the reading and gained database knowledge. Soon I will come with some more stuffs on Technology Knowledge for Tester. 1. GROUPING DATA FROM TABLES IN SQL Apart from SELECT, WHERE, DISTINCT, ORDER BY etc, there are 2 more clauses which facilitate selective retrieval of row. These are the GROUP BY and HAVING clauses. These are same as ORDER BY and WHERE clauses, except that they act on recordsets, and not on individual records. 1.1 CONCEPT OF GROUPING 1.1.1 Group By clause The GROUP BY clause creates a data set, containing several sets of records grouped together based on a condition. Syntax: SELECT (colname1),(colname2),(colnameN), AGGREGATE_FUNCTION(expression) from TABLE NAME where (condition) GROUP BY (colname1),(colname2),(colnameN); For e.g. Consider we want to find out how many employees are there in each department. Select DEPT_NAME, COUNT(EMP_NO)”No. of Employ...

Database Knowledge for a Tester Part IV

1 COMPUTATIONS ON TABLE DATA Computations on table data may include displaying an employee’s name and the employee salary from the EMPLOYEE Master table alongwith the annual salary of the employee (i.e. Salary * 12). This can be achieved by using Arithmetic operator. We will see all these explained in below mentioned sections. 1.1 Operators Usage 1.1.1 Arithmetic Operator Oracle allows arithmetic operators to be used while viewing records from the table or while performing Data Manipulation operations such as Insert, Update and Delete. For e.g. Consider we want to increment the salary of all employees by Rs 500. UPDATE EMPLOYEE SET SALARY = (SALARY + 500) Similarly you can use the above arithmetic operator for manipulating other data based on the requirement. 1.1.2 Logical Operator The AND operator The AND operator requires that each condition must be met for the record to be included in the result set. It can be used in any valid SQL statement such as Select, Ins...

Database Knowledge for a Tester Part III

1. CONSTRAINT CONCEPTS 1.1. Data Constraints Business Rules, which are enforced on data being stored in a table, are called Constraints. It super control the data being entered into a table for permanent storage. If constrains fails during insertion or updation of records, then entire record will be rejected and Insert or Update operation failed. There are 2 types of data constraints which can be further classified as described in below sections. Input/Output Constraints The Primary Key Constraint The Foreign Key Constraint The Unique Key Constraint Business Rule Constraints CHECK Constraints 1.2. Input/Output Data Constraints 1.2.1. Primary Key Constraint Primary Key Constraint defined at Column Level Normally used, to define a single primary key in a table. SYNTAX: [COLUMN NAME] [DATATYPE] ([SIZE]) PRIMARY KEY E.g. CREATE TABLE employee (employee_no varchar2 (10) PRIMARY KEY, employee_name varchar2 (25)); Primary Key Con...

Database Knowledge for a Tester Part II

1 SQL Concepts 1.1 Basic Data Types 1.2 Basic SQL Commands 1.1.1 Create Table SYNTAX: CREATE TABLE [Table Name] ([ColumnName1] [Datatype] ([size]), [ColumnName..n] [Datatype] ([size])); Rule for creating table: · Name can have maximum upto 30 chars. · Name should begin with an Alphabet (A-Z, a-z) and optionally followed by numbers (0-9) · Special character “_” underscore is allowed and also recommended. · SQL reserved words like create, select etc are not allowed. E.g. CREATE TABLE employee (employee_no varchar2 (10), employee_name varchar2 (25)); 1.1.2 Insert Data into Tables SYNTAX: INSERT INTO [TABLE NAME] ([COLUMNNAME1], [COLUMNNAME...N]) VALUES ([EXPRESSION1], [EXPRESSION2]); For e.g. INSERT INTO employee (employee_no, employee_name) VALUES (‘E001’, ‘Sachin Kumar’); Note: Character & Date expressions placed with in the INSERT INTO statement must be enclosed in single quotes. In INSERT INTO if the number of values is same as the number of column then ...