faq qtp selenium

31
Category Tool Tech QTP Tech QTP Tech QTP Tech QTP Tech QTP Tech QTP Tech QTP

Upload: vishal-anand

Post on 21-Dec-2015

222 views

Category:

Documents


1 download

DESCRIPTION

FAQ QTP Selenium

TRANSCRIPT

Category Tool

Tech QTP

Tech QTPTech QTP

Tech QTPTech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Tech QTP

Question

What is QuickTest Professional (QTP) ?

What’s the basic concept of QuickTest Professional (QTP)?Which scripting language used by QuickTest Professional (QTP)?

What are the Technologies supported by QTP:Does QTP run in any environment?

What phases are involved in testing an application in QTP?

What is keyword view and Expert view in QTP?

How many types of recording modes in the QTP?

What is object repository?

What is a data driven test in QTP?

How will you call from one action to another action ?

What are Virtual Objects in QTP?

What is descriptive programming?

What is a data driven test in QTP?

What is Object Spy ? How to Use it ?

How to use Parameterization in QTP?

What is difference between Run time object and Test object?

What are different checkpoints in QTP?

Can we create a QTP test from QC?

What is Smart Identification in QTP?

How can we Disable Smart Identification During the Run Session?

How results are generated in QTP?

How can you handle exceptions in QTP?

How many types of Actions are there in QTP?

Is there any built-in function for Scripting in QTP?

Answer

QTP using VB scripting.

No, QTP works only in the windows environment.

QuickTest is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you

to test standard web objects and ActiveX controls. In addition to these environments, QuickTest Professional also enables you to test Java applets

and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework

applications... QTP is Mercury Interactive Functional Testing Tool. QTP stands for Quality Test

Professional.

QTP is based on two concept-* Recording* Playback

Web, Java (Core and Advanced), .Net, WPF, SAP, Oracle, Siebel, PeopleSoft, Delphi, Power Builder, Stingray 1, Terminal Emulator, Flex, Web Services, Windows Mobile, VisualAge Smalltalk, Silverlight and mainframe terminal

emulator

Keyword View is an icon based view which shows test steps in tabular format. It also automatically generates documentation for the test steps.

Expert View gives the corresponding VB Script statement for every test step in the Keyword view.

The Quick Test Professional process consists of the following main phases:

Analyzing Application: before preparing test cases need to analyze the application to find out the testing needs.

Preparing Testing Infrastructure: based on testing needs create those resources, resources like, shared repository, function library etc.

Building Test Cases: create test script containing action to be performed while testing. Add object repository with the test function libraries.

Enhancing Test: by making use of checkpoints, broadening the scope of test, add logic and condition to test for checking purpose.

Debugging, Running and analyzing Test: debug the test so that it works without interruption. Run these test and analyze the test result generated by

QTPReport Defects: lock bug into the bug report and send it to the development

team.

The QTP enable us with three type of recording mode:

Normal (by Default recording): In this recording mode QTP identify the object irrespective of their location on the screen. It is done by recording object based on application window.Analog Recording: it is used when exact mouse movement and action performed by mouse is important. Used in testing the paint application and signature made with the help of mouse.Low Level Recording: it helps in identifying those objects which is not recognized by the QTP. It is used when the location of object is changing inside the screen.

Object Repository: when QTP learn any object from application it stores those object in the Object Repository with the properties of the object. It is used to identify the object. There are two types of object repository:

Shared Object Repository: It can be shared between multiple tests but it does not allow making changes in the repository. Mostly used in Keyword Driven methodology. It is saved with .TSR extension.Local Object Repository: This type of object repository is linked with only one test. In this we can perform change in the repository, like changing the properties of the object, adding object in the repository. It is saved with .MTR extension.

Data Driven is an automation testing part in which test input or output values, these values are read from data files. It is performed when the values are

changing by the time. The different data files may include data pools. The data is then loaded into variables in recorded or manually coded scripts. In QTP to

perform the data to drive the test, we use the parameterization process. When we do data-driven test, we perform two extra steps:

Converting the test to a data-driven test.Creating a corresponding data table.

We can call an action in 2 ways1) Call to copy of Action. - In this ,the Action Object Repository , Script and

Datable will be copied to the destination Test Script.2) Call to Existing Action. - In this, Object Repository , Script and Datable will

NOT be copied but a call (reference) would be made to the Action in the source script.

Your application may contain objects that behave like standard objects but are not recognized by QTP. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. QTP emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.For example, suppose you want to record a test on a Web page containing a bitmap that the user clicks. The bitmap contains several different hyperlink areas, and each area opens a different destination page. When you record a test, the Web site matches the coordinates of the click on the bitmap and opens the destination page.

Object Spy helps in determining the run & test time object properties & methods of the application under test.

You can access object spy directly from the toolbar or from the Object Repository Dialog Box.

It is very useful during Descriptive Programming

Typically ,an object and its properties must be recorded in the Object Repository to enable QTP to perform action s on it.

Using descriptive programming , you do not store the object and its property values in the Object repository but mention the property value pair directly in

the script.The idea behind descriptive programming is not bypass the object repository

but help recogonize dynamic objects.

Data Driven is an automation testing part in which test input or output values, these values are read from data files. It is performed when the values are

changing by the time. The different data files may include data pools. The data is then loaded into variables in recorded or manually coded scripts. In QTP to

perform the data to drive the test, we use the parameterization process. When we do data-driven test, we perform two extra steps:

a)Converting the test to a data-driven test.b)Creating a corresponding data table.

QTP enable us with different type of Parameterization, passing of data:

a)Using Loop statement.b)Dynamically test data submission

c)Using data table.d)Fetching data from external files.

e)Fetching data from databases.f)By taking test data front end(GUI)

The difference between Run time Object and Test object are:

1)Run time object are actual object in the application whereas test object are reference of the actual object.2)Run time object always have same name whereas test object name varies in different environment.3)Test object are used to identify the actual object in the application which is run time objects.4)Run time object resides in the application whereas test object resides in the object repository.

Checkpoint is a point where QTP current value or property of the object with the expected value or property of the object. When we insert the check point in the test, then in keyword view checkpoint is added in front of current row

and in expert view a checkpoint statement is added. QTP enable us with following types of check point:

Standard Checkpoint: check properties of objects like button, combo boxes, list etc.

Image Checkpoint: check value of an imageBitmap Checkpoint: check image zooming capability.

Table Checkpoint: check information of a table.Text Checkpoint: check text is displayed on correct place.

Text Area Checkpoint: check text is displayed in specific area.Accessibility Checkpoint: used to determine website which is not as per W3C

guidelines.Page Checkpoint: checks properties of the webpage.

Database Checkpoint: check content of databaseXML Checkpoint: check XML content.

Yes we can create QTP test from QC but we must first make sure QTP has the ability to execute tests from Quality Center. Please ensure the following

option in QTP Run Settings is enabled:

When QTP is enabled, follow the below steps to schedule and execute tests from Quality Center:

1. Login to Quality Center and Navigate to Test Lab Module2. After selecting the correct Test Set, Click the Execution Flow Tab.

3. Right-click on the test that requires configuration of Time Dependency and click Test Run Schedule.

4. In the Run Schedule window, select the Time Dependency tab. The time and date of execution can be configured.

5. Time dependency will be added to the relevant test.6. After time dependency has been added, navigate back to the Execution Grid

pane. From the Execution Grid, select the tests to be run at the designated date and time.

7. From the Automatic Runner dialog, click Run All.8. Once Run All is clicked from the Automatic Runner dialog, the test status will change to Waiting and QC will fire the tests to be run at the scheduled

date and time:9. QC will fire the tests in the sequence configured in the Execution Flow pane.

The Test Run Scheduler will show all the tests that were selected and are executing and are to be executed.

QTP has a unique feature by the name Smart Object Identification or recognition which is

used for identifying the objects smartly, whenever the normal identification fails due to the

dynamic changes in the properties of the objects.

Smart Identification is nothing but an algorithm used by the QTP when it is not able to

recognize an object.

Selection of the option “Disable Smart Identification during the run session”, Instructs QTPnot to use the Smart Identification mechanism during the run session.

At the end of the test, QTP generates a result file for the test cases, which is in the form ofa XML tree.

This results file provides detail regarding ‘Pass’ or ‘Fail’ counts, error messages, and allsupporting information which allows the user to diagnose the main cause of a failure.

In QTP Exceptional handling is done by usinga. Recovery Scenarios.

b. Using “On Error” statementIn Recovery scenario you have to define.

1. Triggered Events.2. Recovery steps.

3. Post Recovery Test-Run.At Script Level you can use the On Error Resume Next and On Error Go to 0

statement.

QTP uses three kinds of actions like:

a) Non-reusable Action: Can be called only in the test with which it is stored, and can be

called only once.

b) Reusable Action: Can be called multiple times by the test with which it is stored as well

as by other tests.

c) External Action: Is a reusable action which is stored with another test. External actions

are read-only in the calling test, but we can choose to use a local, editable copy of the Data

Table information for the external action.

QTP uses an in-built functionality called “Step Generator” to create scripts while appropriate

steps are entered into it. Step Generator utility enables us to add steps by selecting from a

range of context-sensitive options and entering the required values.

We can open the Step Generator from the Keyword View or Expert View while recording or

editing our test. We can also open the Step Generator from the Active Screen while editing.

Method to open the Step Generator from a function library is as under:

a) In the function library, click the location in which we want to insert the new step.

b) Choose Insert > Step Generator, or right-click and choose Step Generator. Alternatively,

press F7.

Intro to beginerCareer guidanceInterview quick reference guide(Basic and Advance)Search engine OptimizationPart of Itelearn welcome pack

CategoryTool QuestionCareer QTP/Selenium What’s the future of testing?Career QTP/Selenium what is Pay scale for QTP/Selenium Automation Engineer?

Career Selenium Why learning Selenium is important these days?Career Selenium/QTP How Do I Learn Selenium/QTP Easily?

Career Selenium/QTP

How do I learn Selenium/QTP then?

AnswerDon’t believe us? Just check the QTP vs Selenium Job posting trends from Indeed.com . Based on Current trends, we’re going out on a pretty solid limb and predicting that openings for Selenium and QTP jobs will overtake Normal Automation Jobs within the next two years.

Based on the recent research done by Payscale.com, QTP, selenium tester getting more pay scale compare to automation,manual tester.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.

The Solution – Learn Selenium Online from Expert OR Join class room session,with Several Live Project and 24/7 Techhelp Support - Yes , I am Talking about Itelearn.

Selenium is an open source tool and supported by a large volunteers of open source developers. Selenium has become one of the most popular automation testing tools in the recent days. More and more organizations are adopting Selenium over other commercial software testing tools.

I remember predicting Selenium will be the dominating automation tools in next 3 years. I said this in 2010 to a group of my students and it is almost reality now. Why is it so popular? It is the cost. More and more organizations are cutting cost and divorcing commercial and high cost tools like QTP, rational and MS visual suites of tools. Open source is a cost effective solution in the long run even if the learning curve is little steep. I am sure the job market for selenium will increase in 2013 and coming years.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.

If you do a google search on selenium training offerings, you will find thousands of links offering selenium training including online selenium training. The problem with these offering is that most of them are selling pre-recorded videos with some percentage of live classes or no live one to one interactive classes at all. There are thousands of pre-recorded videos available in youtube. Learning selenium from watching pre-recorded videos is like learning to play cricket from watching cricket matches in TV. These videos do help in to a certain portion but most of the time, they are not effective. To learn cricket, you need to go to the filed and you should be guided by an able coach and you should practice. Same happens with learning any automation tool. You need to practice and should take classes from an able selenium expert who has working experience. Robotic video lectures do not help.