Searching Latest QTP and QA Job Openings becomes Easy Now.

We have launched a Job Search Engine for allowing the users to search latest job openings easily without requiring them to use lot of job sites and employers career pages.

Though this Search Engine can be used for searching any kind jobs, we have specifically optimized it for effectively searching QTP (Quick Test professional) and any other QA (Quality Assurance) related job openings.

You can start using it at here.

In the search results, if you are not seeing any job openings from your favorite company, let me ( know so that I can make this job search engine includes job openings from that company also in future.

And, I have announced Special Offer price for buying eBook version of my Book “Software Testing and QTP Automation”. You can see the details here.

If you are interested in buying this eBook, you can do it before the Offer ends.

Test Strategies for Testing Automatic Resume Submission Service

Few years back, we have developed an Automatic Resume Submission Script.

i-e If a job seeker enters his Resume details in one place, the script will automatically create User Accounts in many U.S job sites for him, and it will automatically post his Resume details in all these Job Sites.

This Kind of Script development is NOT an easy task. It involves lot of complexities. And, we haven’t started doing it properly. Initially we did similar script for one particular customer as a custom development, and later we enhanced it further to bring this Automatic Resume posting script.

Since, we are a small Team with limited budget, right now we are doing some kind of AdHoc testing only.

I am writing this post to initiate a discussion about exploring various Testing Strategies suitable for improving quality of this Automatic Resume Posting Script without requiring more Resources and Time.

Before discussing Test Strategies, let me give some details about this script development.

The important Steps involved in this kind of script development are,

– Automatic resume posting can be done in two different ways. One is, using javascript for auto filling the Forms in the job sites by accessing the DOM of the web page in the Client Side (i-e User’s browser). The other way is, posting the job seeker resume details to the Job Site using php cURL at the http protocol level. (i-e From Server where the Script is Hosted)

The second way (i-e php cURL) is involving some risks. Since the data for all job seekers are getting posted to job sites from same IP Address (i-e same server), the job sites may block that IP address if they thought that it is a DDoS attack.

But I came to know that almost all job sites are encouraging to automatically receive genuine Resume details of Job seekers to increase their customer base. That’s why, they are allowing continuous posting from particular IP. So, I decided to go with the php curl approach.

– First we created set of Function libraries for posting data in various situations (e.g GET method, POST method, with SSL, etc). Unit Testing of these functions is done by hardcoding the resume details in php files.
– Then, we did mapping of various fields of various job sites in mysql tables. (e.g The Input Resume will say experience as 3 years, but one job site will be having option for specifying experience  as “2-4 Years”, and another one will be having the option as “more than 2 years”. We need to map them manually onetime in mysql tables)

– Once after completing Function library creation and Job sites Fields mapping, we started creating php files for each job sites for getting the resume details and mapping details from db and post them to the corresponding job site. Live HTTP header firefox Add-on helped much to do this job. Some job sites will he having Captcha entry. The php script is developed to show the captcha image while doing resume posting.

– Then, created few php files for integrating posting of all job sites and for updating the status of account creation (account creation may fail if the user name already exists in particular job site) and resume posting process.

– Then, created user interface for allowing the Job Seekers to make payment, use discount codes, see reports, do Auto login into job sites, etc. And, created Admin Interface for managing users and resume posting.

I think I have given enough details about the background of this script. Now, let us start discussing about Testing this script.

The important challenge of Testing this Resume submission Script is, we can NOT have any separate Testing Environment. For testing our Time Sheet application, first we setup timesheet script in our local machine, and we will move the code to server only after completing the testing in local machine. We can do whatever we want to do testing in the local machine. But the samething can not be done for testing the Resume submission script. Even if we setup the script in local machine the script need to post the details to the external job sites only.

So, we can not Test the script with junk data as it will spam the job sites.

The Next challenge for Testing the script is, the difficulty of choosing appropriate Test data. As I specified earlier, data Mapping plays important role in this script. So, if you decide to test the script with various test data to test the script including the quality of mapping, we will end with thousands of test data. So, it is NOT feasible to test the script completely by giving Test data. The only workaround is, we need to manually check the mapping in mysql table, by going thro’ the lot of mapping data. It is really difficult task and we will be missing to find some incorrect mappings.

Almost all job sites are updating their user interface frequently. Some job sites are getting closed and some of them are acquired by huge job sites. Some jobsites change their CMS completely. So, the script needs to be updated frequently.

As part of the regression testing, we need to find some way for testing the entire script whenever we update the script. (either the coding or mapping). I think just doing adHoc Testing is NOT enough.

Right Now, I am thinking one approach for testing the script with real data. Instead of testing the script with junk data, I plan to allow the Job seekers to use the Resume Posting Service at very cheap price, in return they need to inform us if they find any issue in the job postings. I am working on creating some Special Discount Codes for the Job Seekers who are interested in joining this plan.
This approach won’t do any harm to the Job seekers. Because during this phase, our Team will be manually checking the quality of resume postings by logining into the each and every job site once the script completed the automatic posting. We can easily update any data if our Team find any issue.

Similarly, I am Planning to sell few copies of this entire script at very low price to the people who are showing willingness to cooperate with us to increase the quality of the script and to maintain the quality of the script at long run even if the job sites are getting changed frequently.

Let me see whether this approach works or not. Anyway, I believe there should be some other ways to test the script properly. You can share your thoughts thro’ the comments.

Update: I have tried above approach, but it didn’t work out as most of the script buyers didn’t spend time for reporting the issues. It seems they bought the script to get details about how we developed this script so that they can use the same concept for various of business. So, I had come up with this investment plan.

Software Testing Questions and Answers

Find the answers at the end of the questions.

1) The approach/document used to make sure all the requirements are covered when writing test cases
a) Test Matrix b) Checklist c) Test bed d) Traceability Matrix

2) Executing the same test case by giving the number of inputs on same build called as a) Regression Testing b) ReTesting c) Ad hoc Testing d) Sanity Testing

3) Control Charts is a statistical technique to assess, monitor, and maintain the stability of a process. a) True b) False

4) To check whether we are developing the right product according to the customer requirements are not. It is a static process a) Validation b) Verification c) Quality Assurance d) Quality Control

5) To check whether we have developed the product according to the customer requirements r not. It is a Dynamic process. a) Validation b) Verification c) Quality Assurance d) Quality Control

6) Staff development plan describes how the skills and experience of the project team members will be developed. a) True b) False

7) It is a set of levels that defines a testing maturity hierarchy a) TIM (Testing Improving Model) b) TMM (Testing Maturity Model) c) TQM(Total Quality Management)

8) A Non-Functional Software testing done to check if the user interface is easy to use and understand a) Usability Testing b) Security Testing c) Unit testing d) Block Box Testing

9) The review and approved document (i.e. Test plan, System Requirement Specification’s) is called as a) Delivery Document b) Baseline Document c) Checklist

10) What are the Testing Levels? a) Unit Testing b) Integration Testing c) System Testing and Acceptance Testing. d) All the above

11) Cost of quality = Prevention Cost + Appraisal cost + Failure cost a) True b) False

12) A useful tool to visualize, clarify, link, identify, and classify possible cause of a problem. This is also called as “fishbone diagram” what is this? a) Pareto Analysis b) Cause-and-Effect Diagram

13) It measures the quality of processes used to create a quality product.
It is a system of management activities,
It is a preventive process, It applies for entire life cycle & Deals with Process. a) Validation b) Verification c) Quality Assurance d) Quality Control

14) Variance from product specifications is called? a) Report b) Requirement c) Defect

15) Verification is
a) Process based b) Product based

16) White box testing is not called as___________
a) Glass box testing b) Closed box testing c) Open box testing d) Clear box testing

17) Name the events that will be analyzed, Count the named incidents, Rank the count by frequency using a bar chart & Validate reasonableness of the analysis is called as a) Pareto Analysis b) Cause and Effect Diagram c) SWOT Analysis d) Pie Charts

18) Retesting of a single program or component after a change has been made? a) Full Regression Testing b) Unit Regression c) Regional Regression d) Retesting

19) Requirement and Analysis, Design, Development or Coding, Testing and Maintenance is called as Software Development Life Cycle (SDLC ) a) True b) False

20) The testing which is done by going thro’ the code is known as,
a) Unit Testing b) Blackbox testing c) White box Testing d) Regression testing

21) Configuration Management Plan describes the Configuration Management procedures and structures to be used. a) True b) False

22)This type of testing method attempts to find incorrect or missing functions, errors in data structures or external database access, interface errors, Performance errors and initialization and Termination errors. It is called as a) White Box Testing b) Grey Box Testing c) Black Box Testing d) Open Box Testing

23) Phase Definition. It will come under a) CMM Level 1 b) CMM Level 2 c) None

24) Software testing which is done without planning and Documentation is known as
a) adHoc Testing b) Unit Testing c) Regression testing d) Functional testing.

25) Acceptance testing is known as
a) Beta Testing b) Greybox testing c) Test Automation d) White box testing

26) Retesting the entire application after a change has been made called as? a) Full Regression Testing b) Unit Regression c) Regional Regression d) Retesting

27) Boundary value analysis belongs to which testing method?
a) Black Box testing b) White Box testing

28) It measures the quality of a product
It is a specific part of the QA procedure, It is a corrective process,
It applies for particular product & Deals with the product. a) Validation b) Verification c) Quality Assurance d) Quality Control

29) What are the Types of Integration Testing? a) Big Bang Testing b) Bottom Up Testing c) Top Down Testing d) All the above

30) Product Risk affects The quality or performance of the software. a) True b) False

31) A metric used to measure the characteristic of documentation and code called as a) Process metric b) Product Metric c) Test metrics

32) Which is non-functional software testing?
a) Unit Testing b) Block box testing c) Performance Testing d) Regression

33) The process that deals with the technical and management issues of software development called as? a) Delivery Process b) Testing Process c) Software Process

34) Executing the same test case on a modified build called as a) Regression Testing b) Retesting c) Ad hoc Testing d) Sanity Testing

35) Which is Black-Box Testing method?
a) equivalence partitioning b) code coverage c) fault injection

36) Business Risk affects The Organization developing or Procuring the software. a) True b) False

37) Stratification is a Technique used to analyze/divide a universe of data into homogeneous groups (strata). a) True b) False

38) Automation Testing should be done before starting Manual testing.

Is the above statement correct?
a) Yes b) No

39) Earlier a defect is found the cheaper it is to fix it.

Is the above statement correct? a) Yes b) No

40) Informing to the developer which bug to be fix first is called as a) Severity b) Priority c) Fix ability d) Traceability

41) Software Testing is a process of evaluating a system by manual or automatic means and verify that it satisfies specified requirements or identity differences between expected and actual results. a) True b) False

42) Retesting modules connected to the program or component after a change has been made? a) Full Regression Testing b) Unit Regression c) Regional Regression d) Retesting.

43) An Important metric is the number of defects found in internal testing compared to the defects found in customer tests, Status of test activities against the plan, Test coverage achieved so far, comes under a) Process Metric b) Product Metric c) Test Metric

44) Alpha testing will be done at,
a) User’s site b) Developers’ site

45) SPICE Means a) Software Process Improvement and Capability Determination b) Software Process Improvement and Compatibility Determination. c) Software Process Invention and Compatibility Determination. d) Software Process Improvement and Control Determination

46) Requirements Specification, Planning, Test case Design, Execution,
Bug Reporting & Maintenance This Life Cycle comes Under a) SDLC b) STLC c) SQLC d) BLC

47) It provides a set of levels and an assessment model, and presents a set of recommended practices that allow organizations to improve their testing processes. a) TIM (Testing Improving Model) b) TMM (Testing Maturity Model) c) TQM(Total Quality Management)

48) Standards and procedures for managing changes in an evolving software product is called? a) Confirmation Management b) Confederation Mangement c) Configuration Management d) Compartability Management

49) Path Tested = Number of Path Tested / Total Number of Paths a) True b) False

50) This Testing Technique examines the basic program structure and it derives the test data from the program logic; Ensuring that all statements and conditions executed at least once. It is called as a) Block box Testing b) White box Testing c) Grey Box Testing d) Closed Box Testing

51) This type of test include, how well the user will be able to understand and interact with the system? a) Usability Testing b) User Acceptance Testing c) Alpha Testing d) Beta Testing.

52) Defects generally fall into the following categories? a) WRONG b) MISSING c) EXTRA d) All the above

53) What is correct Software Process Cycle? a) Plan(P)——>Check(C)——>Act(A)—–>Do(D) b) Plan(P)——>Do(D)——>Check(C)—–>Act(A) c) Plan(P)——>Do(D)——>Act(A)—–>Check(C)

54) Conducted to validate that the application, database, and network they may be running on can handle projected volumes of users and data effectively. The test is conducted jointly by developers, testers, DBA’s and network associates after the system Testing called as a) Functional Testing b) Stress/Load Testing c) Recovery Testing d) Integration Testing

55) Maintenance Plan predicts the maintenance requirements of the system, maintenance costs and effort required a) True b) False

56) Beta testing will be done by
a) Developer b) User c) Tester

57) Validation plan describes the approach, resources and schedule used for system validation a) True b) False

58) Integration, It will come under a) CMM Level 1 b) CMM Level 3 c) CMM Level 2 d) None

59) Types of quality tools are Problem Identification Tools and Problem Analysis Tools. a) True b) False

60) Which Software Development Life cycle model will require to start Testing Activities when starting development activities itself
a) Water falls model b) Spiral Model c) V-model d) Linear model

61) A metric used to measure the characteristic of the methods, Techniques and tools employed in developing, implementing and maintaining the software system called as a) Process metric b) Product Metric c) Test metrics

62) Check Sheet(Checklist) is considered a simple , but powerful statistical tool because it differentiates between two extremes. a) True b) False

63) Application should be stable. Clear Design and Flow of the application is needed for Automation testing. a) False b) True

64) Quality plan describes the quality procedures and standards that will be used in a project. a) False b) True

65) How severely the bug is effecting the application is called as a) Severity b) Priority c) Fix ability d) Traceability

66) Project Risk affects The Schedule or Resources. a) True b) False

67) The name of the testing which is done to make sure the existing features are not affected by new changes
a) Recursive testing b) Whitebox testing c) Unit testing d) Regression testing

68) Management and Measurement, It will come under a) CMM Level 1 b) CMM Level 3 c) CMM Level 4 d) CMM Level 2

69) AdHoc testing is a part of
a) Unit Testing b) Regression Tesing c) Exploratory Testing d) Performance Testing

70) Cost of Production = Right The First time cost(RTF) + Cost of Quality. a) True b) False

71) ————- means under what test environment(Hardware, software set up) the application will run smoothly a) Test Bed b) Checkpoint c) Code Walk through d) Checklist

72) TQM represents
a) Tool Quality Management b) Test Quality Manager c) Total Quality Management d) Total Quality Manager

73) Optimization, Defect Prevention, and Quality Control. Its come under the a) CMM Level 2 b) CMM Level 3 c) CMM Level 4 d) CMM Level5

74) Unit Testing will be done by
a) Testers b) End Users c) Customer d) Developers

75) Beta testing will be done at
a) User place b) Developers place

76) A Plan to overcome the risk called as a) Migration Plan b) Master plan c) Maintenance plan d) Mitigation Plan

77) Splitting project into tasks and estimate time and resources required to complete each task called as Project Scheduling a) True b) False


(1) d (2) b (3) a (4) b (5) a (6) a (7) b (8) a (9) b (10) d (11) a (12) b (13) c (14) c (15) a (16) b (17) a (18) b (19) a (20) c (21) a (22) c (23) b (24) a (25) a (26) a (27) a (28) d (29) d (30) a (31) b (32) c (33) c (34) a (35) a (36) a (37) a (38) b (39) a (40) b (41) a (42) c (43) c (44) b (45) a (46) b (47) a (48) c (49) a (50) b (51) a (52) d (53) b (54) b (55) a (56) b (57) a (58) b (59) a (60) c (61) a (62) a (63) b (64) b (65) a (66) a (67) d (68) c (69) c (70) a (71) a (72) c (73) d (74) d (75) a (76) d (77) a

QTP methods and script for reading object properties

In the previous Chapter, I had written about Object Spy.

For using Object Spy, we need to point the Object Spy pointer on the Object.
i-e We can read the properties manually only. And it can be done in the design time only.
In this post, I am going to write about reading the properties of any Object in the application using scripting (i-e programmatically in run-time)

QTP is having below methods.

GetTOProperty– This method returns the value of the property from the test object’s description, i.e., the value used by QTP to identify the object. In other words the list of properties stored the Object Repository. If the property is not part of the test object’s description, a warning will be issued by QTP.

GetTOProperties – This method is similar to GetTOProperty, but it will list all/collection of properties and their values.

It can be used as below to get all the Test Object properties and their values in “Submit” button of “Login” window in a vb application.

Set theTestObject = VbWindow(“Login”).VbButton(“Submit”)

Set Props = theTestObject.GetTOProperties

PropsCount = Props.Count

For i = 0 To PropsCount – 1

PropName = Props(i).Name

PropValue = Props(i).Value

MsgBox PropName & ” = ” & PropValue


Set theTestObject = VbWindow(“Login”).VbButton(“Submit”)
Set Props = theTestObject.GetTOProperties
PropsCount = Props.Count
For i = 0 To PropsCount – 1
PropName = Props(i).Name
PropValue = Props(i).Value
MsgBox PropName & ” = ” & PropValue

GetROProperty – It will be used to get the value of an object property during runtime, such as the current list/combo item selection, page title, or the text in a WebEdit, or the size (width & height) of an object.

SetTOProperty changes the value of a test object property. Changing the property won’t make any change in the Object Repository, but it will just affect the way QTP identifies the object during runtime. Actually, this changes the properties of the temporary copy of the object stored in RAM by QTP.

i-e QTP is having the methods GetTOProperty,GetTOProperties and SetTOProperty for handing Test Objects.

And, it is having SetTOProperty method for handing Run-time object.
Obviously it can not have method SetROproperty, because QTP script should not change the actual objects (But still we can do it using “Object”. I will write a separate post about it later)

But it can have a method something like getROproperties. As of now, QTP is not having such a method.

So, we can read all RO properties from windows registry.
For example, below piece of code can read the name of properties for “Page” object from the registry.

Const HKEY_LOCAL_MACHINE = &H80000002

Set oReg = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv”)

SKeyPath = “SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\page\Properties”

oReg.EnumValues HKEY_LOCAL_MACHINE, sKeyPath, arrNames

sNames = “List of Properties:” & vbNewLine

For i = 0 to UBound(arrNames)

sNames = sNames & arrNames(i) & vbNewLine


Const HKEY_LOCAL_MACHINE = &H80000002
Set oReg = GetObject(“winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv”)
sKeyPath = “SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\Test Objects\page\Properties”
oReg.EnumValues HKEY_LOCAL_MACHINE, sKeyPath, arrNames
sNames = “List of Properties:” & vbNewLine
For i = 0 to UBound(arrNames)
sNames = sNames & arrNames(i) & vbNewLine

After reading the properties, the script can read each property name from the array “arrNames” and get the run-time object value using GetROproperty method.You can refer below piece of code.

Set TestPage = Browser(“Google”).Page(“qualitypoint”)

For i = 0 to UBound(arrNames)

sNamesRO = sNamesRO & arrNames(i) & “: ” & TestPage.GetROProperty(arrNames(i)) & vbNewLine


MsgBox sNamesRO

Managing Object Repositories in QTP

QTP is having separate window named as “Object Repository Manager” for managing various object repositories.

You can open this window from the Menu “Resources->Object Repository Manager…

The Object Repository Manager enables you to manage all of the shared object repositories used in your organization from a single, central location.
It will be used for adding and defining objects, modifying objects and their descriptions, parameterizing repositories to make them more generic, maintaining and organizing repositories, merging repositories, and importing and exporting repositories in XML format.

The Object Repository Manager window will look like below one.


You can create new shared repository from this window and can store it as .tsr file.

While adding objects, you will be provided with two options. Either you can choose to add only the selected Object or you can choose to add the selected object and its descendants.

You can store the object repositories  either in file system or in Quality Center project.

The Object Repository(OR) Manager enables you to open multiple shared object repositories and modify them as needed.

This Object Repository Manager provides the options such as  “Add objects”, “Highlight in Application”,  and “Locate in Repository”  for the Shared object repository. It is similar to the local object repository. I will be explaining them in separate post.

By default this OR Manager will be in readonly mode. i-e you can not edit anything in this mode.

We need to choose File>Enable Editing for making it editable.

Update from Local Repository option in the OR Manager (Tools > Update from Local Repository) can be used for merging objects from the local object repository of one or more actions to a shared object repository.

And, it provides Object Repository Merge Tool for merging two shared object repositories.

At the end of the merge process, the Object Repository Merge Tool provides a graphic presentation of the original objects in both repositories, which remain unchanged, as well as the objects in the merged target object repository.

Objects that had conflicts are highlighted. The conflict of each object that you select in the target object repository is described in detail. The Object Repository Merge Tool provides specific options that enable you to keep the suggested resolution for each conflict, or modify each conflict resolution individually, according to your requirements.

And note that while the Object Repository Merge Tool is open, you cannot work with the Object Repository Manager.

Apart from this OR Manager, QTP is having “Associate Repositories” option for  enabling you to associate one or more shared object repositories with one or more actions in a test.


Descriptive Programming in QTP

Instead of using Object Repository for storing properties of Test objects, we can straight-away define the properties while writing the script itself.

It can be done in two ways.

One is, by giving the description in form of the string arguments.

For example a text box having html code as <input type=”text” name=”txtUser”> can be accessed as below.

Browser(“Browser”).Page(“Page”).WebEdit(“Name:=txtUser”,”html tag:=INPUT”).set “QualityPoint”.

The other way is using Decription.create as below.

Set objDesc = Description.Create

objDesc(“html tag”).value= “INPUT”

objDesc(“name”).value= “txtUser”

Browser(“Browser”).Page(“Page”).WebEdit(objDesc).set “QualityPoint”.

This Descriptive approach is having some short-comings.

The main disadvantage of Descriptive programming is Maintenance issue.
Since Object repository will be stored in centralized place, property definition for any Object can be easily changed at any time if the application developer changes the property of the actual object/control.

But, in descriptive programming (DP) it is difficult to change the object property as each QTP developer will be defining object property in many places using DP.

For example, assume that you and team member are developing automation test scripts for testing gmail application.
Gmail login script will be used in many test scenarios.

Assume that you are automating some scenarios and your team member is automating some other scenarios.
In case of Object Repository, you and your team member will be forced to use same object description for login page controls/Objects (e.g username, password, login button).

So in future if Google changes any property (e.g change the button name from “login” to “get into gmail”), all the scenarios can be easily updated just by updating this change in Object repository.

But in case of DP, there is a possibility of defining the login button in multiple places. One definition by you and another by your team. (Anyway proper Team Coordination will avoid this issue, but practically it is very difficult to achieve this coordination.).

So, comparatively updating DP style coding is bit difficult if the application properties got changed.

Anyway, Descriptive programming is having its own advantages as mentioned below.

1. We can start work on writing QTP scripts even before the application under Test is NOT available. It will help to increase the utilization of the Automation scripts as it will be immediately available once the application gets released.

2. We can define the properties of an object without considering the parent objects in the hierarchy. i-e Object identification will not depend on its parent object.

Required Steps/Processes in QTP Automation

  • Before starting actual automation task, we should do tool evaluation and feasibility study to make sure QTP is the appropriate tool for automating test cases of our application. It can be done by selecting few sample modules/screens/flow from the application/test cases and create simple QTP scripts to make sure QTP will recognize the objects in our application
  • As part of Test driven development, we can ask the application development team to give proper name or any other identification properties for the objects, if our feasibility study reveals some difficulty for QTP to recognize the objects.
  • As I mentioned earlier, we should start our actual automation work only after completing some basic manual testing to make sure the application is stable and in working condition.
  • QTP developers should review the Test cases and update it to specify which test cases can be automated and which can not be automated. Because ideally it is not possible to automate all the test cases.  Difficulty in navigation or object identification issue or difficulty in verifying the result will prevent automation. If possible, the manual test cases can be rearranged to have separate automation test cases.
  • Once after reviewing all the test cases and after getting familiar with the application we can design the automation frame work for our need.
  • Keep separate instance of application specifically for the purpose of developing automation scripts. It will avoid any unnecessary mess up with manual testing processes.
  • Set up proper QTP development environment with required Add-in and with any add-in extensibility. If many people are going to involve in the development activities then we need to clearly document the responsibility of each person and the approach for sharing the scripts. If application is installed in remote machine then QTP also should be installed in remote machine. Because QTP will not recognize the objects of application in remote session.
  • Set up proper object identification properties in QTP IDE.
  • Once after completing all the above basic steps, the first development task should be adding all the required Test Objects/properties to the Object repository. It can be done by recording or by manually adding the objects to Object repository. If you specify any object using DP (Descriptive Programming) remember to document it.
  • Once after adding all the objects, rename them to have unambiguous/meaningful name.  Doing renaming from object repository will automatically change the name of the object in the script also. But reverse is not true. I-e Renaming a object from script won’t automatically change it in Object repository.
  • Based on your design of automation framework, create reusable actions and vbscript functions using step generator or keyword view or expert view or using Active screen.
  • Using these reusable actions prepare a sample/base script for executing few test cases. And then test it to make it error free.
  • Once after completing the above mentioned sample script, do parameterization (data driven testing) for executing multiple iterations.  Parametrization can be easily done from both keyword view and expert view.
  • Add checkpoints to verify the expected results. Make sure that your checkpoints will work with different data. i-e use regular expressions if some part of expected value will change based on the input data during each iteration of test execution. And, editing checkpoint in QTP is having some issues. So, take care when editing the checkpoint. Mostly changing checkpoint in one place will affect the other checkpoints also. Or, you can create your own functions for creating checkpoints.
  • Use appropriate Regular expression to make sure the script runs in all scenarios even when some properties are getting changed dynamically in particular pattern. For example if your screen page title changes based on the username of the logged in user, the script will not work correctly for all users. (By assuming that the script uses the page title for identifying the screen). You can refer the QTP help files if you don’t know how to add Regular expression.
  • Add the Recovery scenarios to handle any unexpected behavior of the application. Recovery scenario manager and wizards.
  • Use Environment variables to avoid any hard coded values in the script.
  • Do dry run for this sample script and debug the issues in the automation script and fix them.
  • Do the above steps for all the test cases.
  • Create a Driver script which will call all the test scripts. Need to take additional care about deciding whether driver script should take data from its own datasheet or whether it should read data from datatable of the called action.
  • Complete dry run for the Driver script. It is really a challenging task. Because most of the Actions within the Driver script will depend each other and it will take very long time to complete the dry run if we start the dry run from starting point every time whenever the script fails in between the execution. I will explain with one example. Assume that your driver script calls three Tests. First Test will create a user account, second will test the Profile update feature, and third one will test the user deletion feature.  And, assume that the second Test will use the user name created by First test, and the third test deletes the account created by first Test. In this scenario, if you face any difficulty while calling second test we need not always start the dry run from beginning. Since one user account was already created by first Test successfully, we can just comment out the calling of first Test and then continue the debugging of second Test using the already created account.
  • Prepare .vbs script using Automation Object Model to run the QTP scripts in other environments also with same settings. It can be easily done by using “Generate script” option in QTP IDE.
  • Run the scripts in desired environment.
  • Analyze the test results.
  • Report the bugs/defects in the application once after completing the analysis.
  • Once after completing functional testing, select few essential scripts and store them separately for the future Regression Testing.

Automation Object Model

Just as we use QTP to automate testing of our application, we can use Automation Object Model (AOM) of QTP to automate QTP operations.

Using the objects, methods, and properties exposed by the QuickTest automation object model, we can write programs that configure QuickTest options and run tests or components instead of performing these operations manually using the QuickTest interface.

 We can see Generate Script button in the Properties tab of the Test Settings dialog box, the General tab of the Options dialog box, and the Object Identification dialog box. Clicking this button generates an automation script file (.vbs) containing the current settings from the corresponding dialog box.

The generated script will follow the Automation Object Model and it will be useful for transferring setting in one instance of QTP into other instances.

 For example, assume that you are working in your local computer , and you made some changes in the QTP interface.  Once you complete your development in your local machine I will move the scripts to your customer machine. The script may NOT work in your customer machine.

 In this case we need to use this generated script to keep same settings in your customer machine also.

 AOM scripts are useful for scheduling QTP script executions. We will see about this in another chapter.