Friday, March 29, 2013

5 Best Tips to Improve Software Testing Skills and Process


The process of software testing is an important part of life-cycle of software development. There are always new tests carried on for testing skills of the software. The process of software testing can become a bit difficult at times if you do not have the Microstrategy Training. This is because everything happening around you is completely technical. Thus, you have to be prepared to make use of all of your talent. Generally the whole process of testing the skills of the software is carried out in team. To improve software testing skills and process keep the following things in mind.


Make the Team understand the Project Completely

In order to improve the software testing skills and process it is important to make the team understand the process completely. Each member of the team is important and that is the reason they are in the team. Therefore to make the software testing skills and process easy it is important to communicate with each of the team member. The most important task is to make the team understand the project completely.

Testers ready to cope up with changes

It is not expected that there would not be any changes during the software testing skills and process. There can be instances where making changes in the testers become mandatory. But it is very important to revise the change repeatedly before finally implementing it. You should not feel that the changes that you made were not necessary. The changes that are made to make the software testing skills and process technically sound are always welcome.

Divide the Work equally among Team

The team and team members should have equal amount of work assigned to them. Make sure that the work that you assign to your team members are equally distributed as per their ability. This will help you keep a harmony among the team members. The work when equally distributed makes the team a healthy environment to work in.

Maintain friendly relation

Whenever you are working in a team to improve the software testing skills and process always maintain a friendly relation. When you have a good and friendly relation with each and every member of the team your task will be smooth.  To improve the software testing skills and process maintaining a good relation with the team members will fetch you extra benefits.

Have Deep Knowledge on Software

This is the most important and vital part related to the improvement of the software testing skills and process. Every member of your team must have the required and necessary knowledge regarding the software testing skills and process. The selection of the team members should be done judiciously to keep the software testing skills and process uninterrupted. 



About Guest Author
Claudia has been dealing with Microstrategy Training for a long time now. She possesses ample experience in making the software testing skills and process simple and easy. Her Blog has it all, follow me @ITdominus1 .

Friday, February 22, 2013

Automation Testing (QTP) Interview Questions


1) What is Automation testing?
Automation testing means that the execution of 'test scripts' on SUT to compare expected and actual result.

2) Name some automation testing tools?
QTP, Selenium, Load runner, Jmeter , Watir, Sahi, Test complete, Silk test,Winrunner,RFT and etc.

3) Define about QTP?
QTP is a functional testing tool developed by HP. QTP will run on windows computer like XP,Vista,and seven like client side OS and 2003 server, 2008 server like server side OS which can detect defect from  software.

4) Why the Automation testing is preferable?
To decrease the time in testcase execution on SUT testers are going for test automation.

5) What is meant by Test Automation?
Test Automation means conversion of test cases into pragmatical testscripts.

6) Mainly for which type of functional tests, testers are preferring the automation testing?
For sanity , regression and final regression functional tests, testers are preferring the automation testing.

7) What is the need of automation testing in functional testing?
Automation testing is possible for regression levels of functional testing to save time.Because, manually sanity and regression testing are taking more time. Due to this reason testers are going for automation funtional testing using QTP like tool.

8) Which type of functional test cases are preffered for automation?
Test that need to run for every build.
Tests that use multiple data values for some action
 Identical functionl tests that need to be executed using different browsers.

9) Which type of functional test cases are not preffered for automation?
Test cases that are executed only once.
Test cases used for adhoc/random testing.
Test cases that are infrequently selected for execution.
Test cases that need manual interaction i.e., a task that not possible to automate.

10) What is a Test script?
An automated program in QTP is called as Test script.

11) By using how many languages testers are writing test scripts in QTP? and name them?
By using 4 languages they are as follows: VBSript/Jscript,QTPScript,SQL, .Net factory.

12) What is QTPScript?
QTP testing tool is having one language inbuilt called as QTPScript. It is an object based language. Object based language means that the language with inbuilt objects. Object means that it is an interface to access the objects in SUT.

13) In QTP tool when we are using web add-in for testing?
When our SUT is developed in HTML, then the test automators can launch the QTP tool with web add-in.

14) What are the  objects in QTPScript?
Browser, Page, Webdit, Webradiogroup, Webbutton, Webcheckbox, link, Image, Webfile, Webelement, Webtable Weblist and etc.

15) What is the object and method used for launching the website?
'Systemutil' object and 'Run()' method is used for lunching the website.

16) what are the methods are used while working with the password objects?
Set() and setsecure()methods are used while working with the passwords. But here, set() is taking the original password and setsecure() is taking encrypted password.

17) What are the two ways that are used for encrypting the password?
By using the Pass encoder option wich is present in the Tools menu and other way is by using the utility object 'Crypt' and method Encrypt().
Syntax: crypt.encrypt("xxxxxx").

18) Upto how many seconds QTP tool is maintaining delay in the execution in fast mode?
QTP tool is maintaing the delay in execution for 20 seconds in fast mode and after every statement and before going to next statement in normal mode. whereas, QTP tool will maintain delay in execution when SUT is slow in fast mode.


19) In how many ways QTPscript can be generated?
In 4 ways QTPscript can be generated such as by typing (Descriptive programming,)using Record icon, Object repository, Step generator.

20) What is the difference between Recorded programming and  Descriptive programming?
In recorded programming or object repository or step generator program based QTPScript code is maintaining description of SUT objects in object repository. But, typed QTPScript will maintain SUT objects descriptions in code itself. So, typed QTPScript is easy to modify.

21) What are Utility objects?
Utility objects are having properties and methods to provide extra facilities to testers in SUT automation.

22) What are Functions in automation?
Functions are providing some generic activities to test automators like printing, stop testing, executing the external files and etc.

23) What is the use of 'With' statement in QTP?
'With' statement separates the parent object and the child objects.


24) Which method is preferable for automation testing?
Descriptive programming is more preferrable.Because, after recording if we lost objects description in the object repository or if any of the objects in SUT were modified then it is very difficult to make changes. Due to above two reasons descriptive programming is more preferable.

25) Into how many ways SUT's are classified?
In general SUT's are divided into CLI (Command line interface), GUI(Graphical user interface) And No interface. Again in GUI windows based (1 tier, 2 tier), mobile based, and web based (3 tier and N- tier).

26) For automation testing why we need QTPScript anlong with VBScript?
QTPScript language is having test objects, utility objects, functions and statements.These topics of QTPScript are not sufficient for complete website test automation.But VBScript language is providing varibles,arrays, functions,operators and conditional statements,loops and components.

27) What is VBScript?
VBScript is one of the programming language which is developed by the Microsoft derived from visual basic 4.0 inbuilt in windows operating system.

28) What are conditional statements in VBScript?
Like as programming languages VBScript is also providing conditional statements like IF ELSE,SELECT CASE  and etc.

29) What is the use of IF-ElSE statement?
To run a block of code depends on 'Condition' we can use this statement.
Syntax: If condition then
 ------------
                    -----------
                else
------------
                    -----------
               Endif

30) What is the use of SELECT CASE statement?
To run a block of code depends on 'Value' we can use this statement.
Synatx:

31) What is 'description of object' indicates in QTPScript?
The utility object is allowing test automators to specify the description for required type of objects in SUT.
Syntax:                 Set variable name=description.create
                variable name('micclass').value=object name in SUT.

32) Write any example (for example image object)for creating the description object?
Set desco=description.create
desco('micclass').value=image.

33) What is the use of loops in VBScript?
Like as other programming languages, to run a block of code more than one time we are using loops in VBScript.

34) What is the use of FOR-loop?
To execute a block of code more than one time in specified limit we are using FOR-loop.
Syntax: for i=1 to step 1
                   -----------
                   -----------
                  Next

35) What is the difference between FOR-loop and WHILE-loop?
FOR-loop is count based and WHILE-loop is condition based.

36) What is the difference between WHILE-loop and DO WHILE-loop?
WHILE-loop is checking the condition at first and executing as long as the condition is true. But, DO WHILE-loop is first executing the condition and after it will check the condition. Here at least one time block of code will be executed in DO WHILE loop.
Syntax for while loop: 
                 While condition
                   -----------
                   -----------
                  Wend
Syntax for do while loop:
do
-----------
                   -----------
loop While condition
        -----------
                   -----------

37) What are the statements that are used for terminating the infinite loop,do-while and while until loops,infinite FOR-loop?
'Exit do' statement is used for terminating the infinite loop,do-while and while until loops  and 'Exit for'  the statement is used for terminating the infinite FOR-loop.

38) What is the use of 'regular expressions' in QTPScript?
Some times SUT objects are having lengthy names or titles and SUT objects titles or names are dynamically changes.To handle these two situations we are using the regular expressions in QTPScript.

39) How to handle the situation when developers are givien same name or title to multiple objects while writing the automation scripts in QTP?
To distinguish the similar objects names in QTP test automators aare using ordinal identifiers like 'index', location, and creation time (for browser object).

40)What is the use of 'INDEX' property in QTP?
When developers given same names for all the same type of objects in SUT then, we are using the 'INDEX'  property.

41)What is the use of 'LOCATION'property in QTP?
Location property will be used when developer used same type of object for different labels.

42) What is use of 'CREATION TIME' property'in QTP?
While working with the Browser objects, test automators are using 'creation time' property.
For example creation time is '0' for 1st opened browser after launching QTP tool and then recently opened browsers are getting creation time 1,2 ,3,...... etc.

43) When we will use the FOR EACH loop?
We can use the FOR EACH loop to run  a block of code more than 1 time depends on a group or list or an array.

44) What is an 'Array' in VBScript?
A collection of data is called as an array.
Syntax: option explicit
                Dim Array name(size of an array)
               
example: option explicit
                     Dim x(5) (Here x is an array of 6 elements which is indexing from 0-5).

45) What is 'List' in VBScript?
A collection of objects is called as 'List'. Arrays and List both index will start from '0'.

46) How we can increase the size of an array dynamically? and what is the disadvantage of that statement? How we can overcome from it?
We can increase the size of array dynamically by using 'REDIM' statement. But the disadvantage of this statement is that it is destructing the previously allocated memory and create the fresh new memory. Due to this reason we are losing the previous data. To prevent this destruction we can use the below type of statements.
Option explicit
Dim x()
---------
--------
Redim x(array size)
---------
--------
Redim preserve x(Array name)
--------
--------

47) How can we make list of objects in QTP?
To make list of objects, at first we should create 'description' for required object in SUT and then collect references for all the objects in SUT into a variable called as list in VBScript. So, one VBScript consists of references to multiple objects in SUT.

48) What are the differences between arrays and lists?
a) Array is the collection of dissimilar values and list is the collection of similar type of values.
b) Redeclaration is possible in array and redeclartion is not possible in list .
c) Use array in code by using array name and index. Use list in code by using list name and index.

49) Why we use functions in QTPScript?
After getting the data from SUT screens by running the QTPScript code test automators  are using the functions to validate that data.

50) Name some functions in QTPScript?
Inputbox(), Msgbox(), Array(),is numeric(),Date(),Time(),Now(),Month(),Day()Year(),weekday(),minute(),second(),datediff() instr() and etc.

51) In how many ways we can launch SUT? and what are they?
In two ways test automators are launching the SUT i.e., by using the system util object and run() method. The other way to launch SUT is that by using the Invoke application() function.
Syntax: systemutil.run("Path of SUT")
Example: systemutil.run("http:// www.google.co.in")
                                or
bro="c:\programfiles\internet explorer\iexplorer.exe"
Url="http:// www.google.co.in"
invoke application(bro&""&Url)

52) By using which function we can create an object for specified component?
By using Create object() function in VBScript we can create an object for specified component.

53) What is the use of components in VBScript?
VBScript language is having some build in components. By using those components, test automators are creating the objects to access external files and softwares like .txt,.doc,.xlsx,Ms-outlook,SUT databases, and etc.

54) Which component is used to work with the Ms-excel?
In general, manual testers are using Ms-excel to write test cases along with testdata.So, test automators need to use Ms-excel in test automation using QTP. And VBScript language is providing "Excel.application" component.

55) Which function is used to define the sleeping state in execution?
To define the sleeping state in execution we are using Wait() function.

56) When we are using the mouse automation?
In general analog recording concept was used for mouse automation. Mouse automation was needed in QTP when some of SUT objects are not responding in automation.
syntax: Window("page/window title").Runanalog("track name")

57) How many color indexes thus VBScript supports on Ms-excel?
VBScript is supporting 56 color indexes for 56 colors ranging from 1 to 56.

58) How many indexes thus VBScript supports for charts or graphs on Ms-excel?
Total 9 indexes thus Ms-excel application is supporting ranging from 61 to 70.

59) Which property thus test automators are using for objects in pop-up windows?
While writing the QTPScript code for pop-up windows automation in DP, test automators can use 'text' property for objects in pop-up windows.

60) Which function we are using to compare the two strings?
We can use Strcomp() function to compare the two strings. If both are same then it  returns 0. If first string is greater than second string in alphabetical order then it returns 1.


Creation Of Tables

Table:

A 'Table' is the only format used by the user to store and get back the data from any database. The table will contain the data in the form of rows and columns. While creating a table we must specify the following details:

a) Name of the table
b) Details of the columns such as columns name, datatype and size.

Note - 1: A table name will contains a maximum of 255 characters including spaces and it contain a maximum of 1024 columns.

Note - 2: A maximum size of data that can be entered in a single record is 8060 bytes.

Creating A table Using Navigation:

Step - 1: Open the management studio tool and connect to the server.
Step - 2: Under the required database right click on the table section.
Step - 3: Select new table option and provide the columns details
Step - 4: Click on the save table icon.
Step - 5: Specify name of the table and click OK button.

Creating Table Using Command:

To create a table using command below specified syntax will be followed:
Syntax: create table <table name>(<column 1><data type>(size)[NOT NULL| DEFAULT(value)|IDENTITY(seed,increment )],<column 2> <datatype>......<column N> <datatype>.

 NOT NULL: A column with this option doesnot allow NULL value.The user must provide a value to this column while entering the data.

DEFAULT: The constant option specified in this option will be used as column data. If the user not entering a value at that time of insertion.

Example: create table products(product id int NOTNULL, prodname char(10),prodqty int DEFAULT 300).
 In the above example, DEFAULT value 300 will be took if no value is given.

IDENTITY: This property will be used to generate a number automatically in a column. The auto generation can be controlled with "seed" and increment values.
Seed specifies the initial value of the column and increment specifies howmuch the previous value should be incremented for each insert. A table must contain only one identity column

Example: create table customers(custid int IDENTITY(10,1),custname char(10)).

From the above example the initial value(seed) will be 10 and every time 1(increment) will be increased.

Modifying Table Data:

Step - 1: Right click on the table name.
Step - 2: Select modify option(design option for 2008 and 2012)
Step - 3 In the window display add new columns modify or delete the existing column data.
Step - 4: Click on the save table icon to save the changes.  

Manipulating Table Data: 

Step - 1: Right click on the table name.
Step - 2: Select open table option(Edit top 200 rows for 2008 and 2012).
Step - 3 In the window displayed add new records,modify or delete existing record data.

Note: When we close the window changes will be automatically saved into database.

Note: The DML commands will be used such as select, insert, update and delete can be used to perform operations on the table data.

Entering Table Data: 

The insert statement will be used to enter the data into the table. If we providing the values for  all the columns of the table then it is optional to provide the columns list. Whereas, if we are entering the data for particular columns only then we must specify the columns list by representing the names of the columns for which we are supplying the data.

Syntax: Insert into <table name> [Columns list>] values <Columns data>

Example: 
Case -1: Insert into products (prodid,prodname,prodqty) values(1.'p1',200).
Case -2: Insert into products values(2,'p2,'150)

               (No need to specify the columns list)
Case -3: Insert into products values(3,'p3,'400)
               (It will get error, because we havn't specified columns list)
Case -4: It is possible to enter multiple records at a time into table as follows:

Example: insert into products
                   select 4,'p4', 200 union all
                   select 6,'p5', 350 union all
                   select 5,'p6', 600

                      
Modifying Table Data:

The 'update' command will be used to modify the table data of an existing table.With this command we can able to modify the single column or single record as follows:

Syntax:
update <table name> set <col 1> = <value 1>,  <col 2> = <value 2>,......[where <condition>].

Example:
  Case -1: update products set prodqty = 100 where prodid =3
               (Modifies the property of prodqty value for only the records with period 3)

  Case -2: update products set prodqty = 100

              (Modifies the prodqty value to 50 for all records)

  Case -3:  update products set prodname='p5',prodqty = 100 where prodid=5
                 (update products set prodqty =200 where prodid=1 or prodid=4

        Case -4:Update products set prodqty = 100 where prodid =3 or prodid =4.
                (Modifies the prodqty value for the records with the period 3 or 4)

        Case -5:Update products set prodqty = 100 where prodid IN(1,2,3).
                (Modifies the property of prodqty value for the records with the prodid value as 1/2/3).

Deleting the table data:

Either  by using delete or truncate, we can able to remove the data from the table. Both these commands will remove only the table data not the structure.

Syntax: (Truncate)
Truncate table <table name>
Example : truncate table <products>
Syntax: (Delete)
Delete from <table name> where <condition>
Example: delete from products where prodid = 2

Differences between truncate and delete commands:

Truncate:
  •     It is used to remove all the records of the table only.
  •     It removes entire table data at once. So, it executes faster than delete command.
  •     After deleting all the records when we insert a new record in the identity column, the auto generation will be restarted from the beginning.
  •      It maintains the removed “ datapage” details in the transaction log file.

Delete:

  • It remove either all the records or particular records of table.
  • Even though we are deleting all the records, the deletion will be done row by row.
  • In this case, the auto generation will be continued normally.
  •  It maintains the removed record details in the log file.

Datapage:

It is the format of storing the data physically inside SQL sever. As a user we will store and get back the data in the form of table data inside the SQL server will be stored in the form of datapages. Each datapage will occupy 8 kb of memory. If the table data is not fit in a single page then multiple pages will be occupied by the table. A combination of 8 pages is called as “1 extent”.
Note: In case of ‘ORACLE’ database, after removing all the records with the truncate command we cannot get back the deleted records by using the ‘ROLLBACK’ statement. But, after deleting the data with ‘DELETE’ command by using ‘ROLLBACK’ we can get back the deleted records. Whereas, in SQL server either after truncate or delete commands we can get back deleted records by using the ‘ROLLBACK’.

Example by using ‘DELETE’ command: 

Begin transaction
Select * from products
Delete from products
Rollback

Example by using  ‘TRUNCATE’ command: 

Begin transaction
Select * from products
Truncate table products
Select *  from products
Rollback
Select * from products









Introduction To HP-QTP


                           Introduction to QTP

History of QTP:

‘QTP’ stands for ‘Quick Test Professional’. This tool is combination of Mercury- Interactive Winrunner and Atra’s Quick test tools. The current owner of QTP is HP(Hawlet and Packerd)and current version is QTP 11.0.
  • Developed by HP
  • Functional testing tool
  • Run in windows computer like XP,Vista,and Seven like client side OS and 2003 server, 2008 sever like sever side OS.
Differences between HP-QC 10.0 and HP QTP 11.0

HP-QC 10.0
  • HP-QC is developed by HP.
  • HP-QC is a test management tool including defect reporting and tracking.
  • HP-QC will run on only server side OS like 2003, 2008.
  • P-QC is reporting defect to specific person.
HP QTP 11.0
  • HP-QTP is developed by HP.
  • HP-QTP is a functional testing tool.
  • HP-QTP will run on client and server side OS.
  • HP-QTP defect detecting from software.
Manual testing Vs Automation testing

In general, testing people can test a software by executing test cases but, test cases are in folders or in QC database in server computer. But, to  decrease the time in test cases execution on SUT testers are going to ‘test automation’.

‘Test excecution’ means comparing the test cases expected value to the SUT actual value which is compared by the manual tester (Manual Testing).
                                                                                 
From the above diagram manual testing means comparison of the test cases expected value to the SUT actual value which is compared by the manual tester.

From above diagram test automation means that the conversion of test cases into programatical testscripts. Here, test cases are in English language and stored them in a folder or in QC database.

“Automated testing” means that execution of test scripts on SUT to compare expected values and actual values.

Double V – Model:  (VV and A model)

From the above model, Software testers are reading SRS(Verification ) to understand project requirements, writing test scenarios and cases (Validation) for responsible modules and testing topics and automate those cases (Automation) by using QTP like testing tools i.e., VV and A model.

Need for test automation in software testing

From the above table, automation was needed for regression levels of functional testing and all levels of performance testing. There is no wellknown tools in market for all other Non-Functional testing.

Need for Automation Testing in Functional Testing

From previous heading, Automation is applicable for regression levels of functional testing to save time. Because, manually sanity testing and regression testing are taking more time. Due to these reasons testers are following below factors to goto functional test automation by using QTP like Tool.

The following types of functional test cases are preffered (But not limited to) for automation:
  • Tests that need to run for every build.
  • Tests that use multiple data values for same action.
  • Identical functional tests that need to be executed using different browsers .
Ex: Websites.

The following types are not considered to be good cases for automation:
  • Test cases that executed only once.
  • Test cases used for adhoc / random testing.
  • Test cases that are infrequently selected for execution.
  • Test cases that will require manual interaction i.e, a task not possible to automate.
  • The most important one that is based on intuition and knowledge of application.
EX: If you find that you cannot escape from manual interaction (ex: Intellegent games).

 Functional Test Automation Tools:

There are four generations of functional testing tools:
In 1st generation, we can see all commercial tools and they are using vendor languages to write test scripts.
   
Example: Winrunner, SQA Robot, Silk test ….. etc (Commercial tools + Using own languages)


In 2nd  generation, we can see all commercial tools and but they are generating test scripts in generic languages. 

Example: QTP(HP),  RFT (IBM) (Rational Functional Test), Test complete(Compuware). 

In 3rd generation we can see open source tools they are using generic languages to generate testscripts . But, support is the problem.

 Example: Selenium, Sahi, Watir…. Etc.

In 4th generation opensource generic languages directly to write testscripts. But, those languages are typical or complex to testers. Because testers are not strong in the programming.

Example:   Perl, Python ……. Etc

Launching QTP Tool :

Double Click on QTP tool logo --> Click continue in license window--->Click OK in add-in manager window--->OK---> File menu--->New--->Test.

TestScripts in QTP Tool:

From introduction of QTP, Functional test cases are automatable using QTP tool. An automated program in  QTP is called as Script or TestScript.

Testers are writing test scripts in QTP tool by using 4 languages as shown in below figure.

Proof Of Concept (POC):

After launching  QTP tool and before writing test scripts, test automators can follow navigation for proof of concept means that QTP tool is supporting automation on SUT.

In this POC process, test automators can follow below steps:
  1. Knowing Technology used by developers to develop SUT screens and database.
  2. Launch QTP tool with suitable add- ins w.r.t SUT technology used by developers.
  3. Click continue in license window while launching QTP.
  4. Tools menu-à object spyàapply hand icon on SUT objectsàObserve identification properties of corresponding objects.

Friday, February 1, 2013

Recording Methods in QTP




Click Record Icon
Using Object Repository
Using Step Generator
Differences After Changes Made to Recording and DP


QTP Script language



QTP Script Code Generation Methods


QTP Script And ADD-ins




For Web Add-in
For Web Add-in and Java Add-in
For Web Add-in and SAP Add-in
For Web Add-in and Flex Add-in
For Web Add-in and Dotnet Add-in
For Web Services Add-in
Working with Mobile Add-in
Working with Terminal Emulator Add-in



Recommend on Google

 

Followers

Popular Posts