Saturday, September 25, 2010

QTP Certification - Review your Skills: Q. 21 to 30

Q. 21: Object Spy can be found in __________ menu.

A. Tool

B. Tools

C. Task

D. Tasks
<<<<<< =================== >>>>>>
Q. 22: The ________________ displays the open documents side-by-side.

A. Tile Vertically

B. Tile Horizontally

C. Cascade

D. Tile Cascade
<<<<<< =================== >>>>>>

Q. 23: For opening the Quick Test Professional Help we can use _________

A. F3

B. F5

C. F1

D. F2

<<<<<< =================== >>>>>>

Q. 24: If QTP cannot find any object that matches the description, or if it finds more than one object that matches, QuickTest may use the ___________________ mechanism to identify the object.

A. Ordinal Identifier

B. Index Identifier

C. Smart Identification

D. Assistive Identification


<<<<<< =================== >>>>>>

Q. 25: You can configure the _________ and ___________.properties that QuickTest uses to record descriptions of the objects in your application

A. Mandatory, assistive, and ordinal identifier
B. Mandatory, required, and ordinal identifier
C. Smart, assistive, and ordinal identifier
D. Index, assistive, and ordinal identifier


<<<<<< =================== >>>>>>

Q. 26: The ___________ property set for each test object is created and maintained by QuickTest.

A. Run-Time Object
B. Test Object

C. Smart Identification Object
D. Assistive Object


<<<<<< =================== >>>>>>


Q. 27: You can access and perform ______________ methods using the Object property.


A. Run-Time Object

B. Test Object

C. Smart Identification Object

D. Assistive Object

<<<<<< =================== >>>>>>

Q. 28: You can view or modify the test object property values that are stored with your test in the _______________

A. Information Pane
B. Data Table
C. Information Pane & Data Table Both
D. Object Properties & Object Repository dialog box.


<<<<<< =================== >>>>>>


Q. 29: You can retrieve or modify property values of the test object during the run session by adding _______________ statements in the Keyword View or Expert View.


A. GetROProperty & SetROProperty
B. GetTOProperty & SetTOProperty
C. GetTOProperty & SetROProperty

D. GetROProperty & SetTOProperty

<<<<<< =================== >>>>>>

Q. 30: If the available test object methods or properties for an object do not provide the functionality you need, you can access ______________ of any run-time object using the Object property.

A. The internal methods and properties
B. The mandatory methods and properties
C. The selective methods and properties
D. The assistive methods and properties

Correct Answers to Questions - Q.21 to Q 30 are as under:


QTP Certification - Review your Skills: Q. 11 to 20


Q. 11: Using the Object Spy, you can view
A. The run-time or test object properties and methods of any object in an open application.
B. The run-time or test object properties of any object in an open application.
C. The test object properties and methods of any object in an open application.
D. The run-time object properties and methods of any object in an open application.
<<<<<< =================== >>>>>>
Q. 12: There are ________ object type filters in Object spy dialog box.
A. Two

B. Three

C. Four

D. Five
<<<<<< =================== >>>>>>
Q. 13: In the Object Spy window, in the Properties Tab
A. Copying of Properties and its values is possible with CTRL+C
B. Copying of Properties and its values is possible by right clicking on it and choosing copy.
C. Copying of Properties and its values is possible with both A. and B. methods
D. Copying of Properties and its values is possible is not possible
<<<<<< =================== >>>>>>
Q. 14: In the Object Spy window, in the methods Tab
A. Copying of Methods is possible with CTRL+C
B. Copying of Methods is possible by right clicking on it and choosing copy.
C. Copying of Methods is possible with both A. and B. methods
D. Copying of Methods is possible is not possible
<<<<<< =================== >>>>>>
Q. 15: Object Spy dialog box
A. Can be resized
B. Cannot be resized

<<<<<< =================== >>>>>>

Q. 16: The ___________ are the highest level of the test hierarchy in the Keyword view.
A. Tests
B. Steps

C. Call to Actions

D. Actions
<<<<<< =================== >>>>>>
Q. 17: You can copy and paste or drag and drop actions to move them to a different location within a test
A. True

B. False
<<<<<< =================== >>>>>>
Q. 18: You can print the contents of the Keyword View to your Windows default printer (and even preview the contents prior to printing.
A. True

B. False
<<<<<< =================== >>>>>>
Q. 19: In the Keyword View, you can also view properties for items such as checkpoints.
A. True

B. False
<<<<<< =================== >>>>>>
Q. 20: In the step Browser > Page > Edit > Set "Genius", identify container object(s)
A. Browser

B. Edit

C. Page

D. Both Browser & Page


Correct Answers to - Q.11 to Q 20 are as under:

QTP Certification - Review your Skills: Q. 1 to 10

Objective Type / Multiple Choice Questions on QTP - QuickTest Professional under the Series

(Quickly Review Your QTP Skills before appearing for HP Certification Exam)

Set of 10 Questions

Q. 1: You can manage the test actions and the test or function library steps using the _________ menu commands

A. File

B. Edit

C. Automation

D. Tools

<<<<<< =================== >>>>>>

Q. 2: To expand all the steps in the keyword view which option you would use from the View menu.
A. Expand

B. Expand All

C. Expand Items

D. Expand Rows

<<<<<< =================== >>>>>>

Q. 3: What is the shortcut key to open a Step Generator?

A. F2

B. F5

C. F6

D. F7

<<<<<< =================== >>>>>>

Q. 4: Function Definition Generator in found in which menu option.

A. File

B. Tools

C. Insert

D. View

<<<<<< =================== >>>>>>

Q. 5: The shortcut keys for Record, Stop and Run respectively are

A. F3, F4, F5

B. F4, F3, F5

C. F4, F5, F3

D. F3, F5, F4

<<<<<< =================== >>>>>>

Q. 6: What is the shortcut key for opening an Object Repository?

A. Alt+R

B. Shift+R

C. Ctrl+R

D. Shift+O+R

<<<<<< =================== >>>>>>

Q. 7: Shortcut key to Insert/Remove a breakpoint is

A. F9

B. F8

C. Ctrl+b

D. Shift+b

<<<<<< =================== >>>>>>

Q. 8: The __________ runs only the current line of the script. If the current line calls a method, the method is displayed in the view but is not performed.


A. Step over

B. Step out

C. Step into

D. Step Till


<<<<<< =================== >>>>>>

Q. 9: The ________ runs only the current line of the script. When the current line calls a method, the method is performed in its entirety, but is not displayed in the view.

A. Step Over

B. Step Out

C. Step Into

D. Step Till

<<<<<< =================== >>>>>>

Q. 10: What is the shortcut key to clear all Breakpoints?

A. Ctrl+Shift+F9

B. Shift+Ctrl+F9

C. Alt+Shift+F9

D. Alt+Ctrl+F9

Essential Elements of Testing Web Applications

Today everyone depends upon websites for business, education and trading purpose. Websites are related to the internet. It is believed that no work is possible without internet today. There are so many types of users connected to the websites who need different type of information. So, websites should respond according to the user requirements. At the same time, the correct behaviour of sites has become crucial to the success of businesses and organizations and thus should be tested thoroughly and frequently.

Here we are discussing various methods to test a website. However, testing a website is not an easy job since we have to test not only the client-side but also the server-side. With this approach we can completely test a website with minimum number of errors.


Introduction to Web Testing:
The client end of the system is represented by a browser, which connects to the website server via the Internet.The centerpiece of all web applications is a relational database which stores dynamic contents. A transaction server controls the interactions between the database and other servers (often called "application servers"). The administration function handles data updates and database administration.



According to the above Architecture of Web Applications, It is evident that we need to conduct the following tests to ensure the suitability of web applications.

1) What are the expected loads on the server and what kind of performance is required under such loads. This may include web server response time, database query response times.

2) What kind of browsers will be used?

3) What kinds of connection speeds will they have?

4) Are they intra-organization (thus with likely high connection speeds and similar browsers) or Internet-wide (thus with a wide variety of connection speeds and browser types)?

5) What kind of performance is expected on the client side (e.g., how fast should pages appear, how fast should animations, applets, etc. load and run)?


There are many possible terms for the web application development life cycle including the spiral life cycle or some form of iterative life cycle. A more cynical way to describe the most commonly observed approach is to describe it as the unstructured development similar to the early days of software development before software engineering techniques were introduced. The "maintenance phase" often fills the role of adding missed features and fixing problems.



We need to have ready answers to the following questions:

1) Will down time for server and content maintenance / upgrades be allowed? How much?

2) What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

3) How reliable the Internet connections are? And how does that affect backup system or redundant connection requirements and testing?

4) What processes will be required to manage updates to the website's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?

5) Will there be any standards or requirements for page appearance and/or graphics throughout a site or parts of a site?

6) How will internal and external links be validated and updated? How often?

7) How many times the user login and do they require testing?

8) How are CGI programs, Applets, Javascripts, ActiveX components, etc. to be maintained, tracked, controlled and tested?

Functional or Black Box Testing of Web Applications

Web Browser-Page Testing:
This type of test covers the objects and code that executes within the browser, but does not execute the server-based components. For example, JavaScript and VB Script code within HTML that does rollovers, and other special effects. This type of test also includes field validations that are done at the HTML level. Additionally, browser-page tests include Java applets that implement screen functionality or graphical output.


For web browser testing we can create test cases using following guidelines:

1) If all mandatory fields on the form are not filled then it will display a message on pressing a submit button.

2) It will not show the complete information about sensitive data like full credit card number, social security number (SSN) etc.

3) Hidden passwords.

4) Login by the user is must for accessing the sensitive information.

5) It should check the limits of all the fields given in the form.


Transaction Testing:
In this testing, test cases are designed to confirm that information entered by the user at the web page level makes it to the database, in the proper way, and that when database calls are made from the web page, the proper data is returned to the user.


Conclusion:
For trouble-free operation of a website we must follow both non-functional and functional testing methods. With these methods one can test the performance, security, reliability, user interfaces etc. which are the critical issues related to any website.

Non Functional Testing of Web Applications

Non Functional or White Box Testing of Web Applications invove either or all of the following seven types of testing

1) Configuration Testing: This type of test includes

2) Usability Testing

3) Performance Testing

4) Scalability Testing

5) Security Testing

6) Recoverability Testing

7) Reliability Testing


Let us discuss each types of these testings in detail


1) Configuration Testing: This type of test includes

a) The operating system platforms used.

b) The type of network connection.

c) Internet service provider type.

d) Browser used (including version).


The real work for this type of test is ensuring that the requirements and assumptions are understood by the development team, and that test environments with those choices are put in place to properly test it.


2) Usability Testing:

For usability testing, there are standards and guidelines that have been established throughout the industry. The end-users can blindly accept these sites since the standards are being followed. But the designer shouldn't completely rely on these standards.

While following these standards and guidelines during the making of the website, he should also consider the learnability, understandability, and operability features so that the user can easily use the website.


3) Performance Testing: Performance testing involves testing a program for timely responses.

The time needed to complete an action is usually benchmarked, or compared, against either the time to perform a similar action in a previous version of the same program or against the time to perform the identical action in a similar program. The time to open a new file in one application would be compared against the time to open a new file in previous versions of that same application, as well as the time to open a new file in the competing application. When conducting performance testing, also consider the file size.


In this testing the designer should also consider the loading time of the web page during more transactions. For example: a web page loads in less than eight seconds, or can be as complex as requiring the system to handle 10,000 transactions per minute, while still being able to load a web page within eight seconds.


Another variant of performance testing is load testing. Load testing for a web application can be thought of as multi-user performance testing, where you want to test for performance slow-downs that occur as additional users use the application. The key difference in conducting performance testing of a web application versus a desktop application is that the web application has many physical points where slow-downs can occur. The bottlenecks may be at the web server, the application server, or at the database server, and pinpointing their root causes can be extremely difficult.


We can create performance test cases by following steps:

a) Identify the software processes that directly influence the overall performance of the system.

b) For each of the identified processes, identify only the essential input parameters that influence system performance.

c) Create usage scenarios by determining realistic values for the parameters based on past use. Include both average and heavy workload scenarios. Determine the window of observation at this time.

d) If there is no historical data to base the parameter values on, use estimates based on requirements, an earlier version, or similar systems.

e) If there is a parameter where the estimated values form a range, select values that are likely to reveal useful information about the performance of the system. Each value should be made into a separate test case.

Performance testing can be done through the "window" of the browser, or directly on the server. If done on the server, some of the performance time that the browser takes is not accounted for.


4) Scalability Testing:

The term "scalability" can be defined as a web application's ability to sustain its required number of simultaneous users and/or transactions, while maintaining adequate response times to its end users.

When testing scalability, configuration of the server under test is critical. All logging levels, server timeouts, etc. need to be configured. In an ideal situation, all of the configuration files should be simply copied from test environment to the production environment, with only minor changes to the global variables.

In order to test scalability, the web traffic loads must be determined to know what the threshold requirement for scalability should be. To do this, use existing traffic levels if there is an existing website, or choose a representative algorithm (exponential, constant, Poisson) to simulate how the user "load" enters the system.


5) Security Testing:

Probably the most critical criterion for a web application is that of security. The need to regulate access to information, to verify user identities, and to encrypt confidential information is of paramount importance. Credit card information, medical information, financial information, and corporate information must all be protected from persons ranging from the casual visitor to the determined cracker. There are many layers of security, from password-based security to digital certificates, each of which has its pros and cons.

We can create security test cases by following steps:

a) The web server should be setup so that unauthorized users cannot browse directories and the log files in which all data from the website stores.

b) Early in the project, encourage developers to use the POST command wherever possible because the POST command is used for large data.

c) When testing, check URLs to ensure that there are no "information leaks" due to sensitive information being placed in the URL while using a GET command.

d) A cookie is a text file that is placed on a website visitor's system that identifies the user's "identity." The cookie is retrieved when the user revisits the site at a later time. Cookies can be controlled by the user, regarding whether they want to allow them or not. If the user does not accept cookies, will the site still work?

e) Is sensitive information stored in the cookie? If multiple people use a workstation, the second person may be able to read the sensitive information saved from the first person's visit. Information in a cookie should be encoded or encrypted.


6) Recoverability Testing:

Website should have backup or redundant server to which the traffic is rerouted when the primary server fails. And the rerouting mechanism for the data must be tested. If a user finds your service unavailable for an excessive period of time, the userwill switch over or browse the competitor's website. If the site can't recover quickly then inform the user when the site will be available and functional.


7) Reliability Testing:

Reliability testing is done to evaluate the product's ability to perform its required functions and give response under stated conditions for a specified period of time.

For example: A web application is trusted by users who use an online banking web application (service) to complete all of their banking transactions. One would hope that the results are consistent and up to date and according to the user's requirements

An introduction to Control Flow Testing – A Black Box Testing Technique

Behavioral control-flow testing was introduced as the fundamental model of black-box testing. The control-flow graph is the basic model for the test design.

Control-flow behavioral testing is a fundamental testing technique that is applicable to majority of software programs and is quite effective for them. It is generally applicable for comparatively smaller programs or even for smaller segments of bigger programs.

The Technique of Test Design & Execution

Test design begins by creating a behavioral control-flow graph model from requirements documents such as specifications. The list notation is generally more convenient than graphical graphs, but small graphs are an aid to model design.

Test design and execution consists of the following steps:

Step 1: Examine the requirements and validate: Examine the requirements and analyze them for operationally satisfactory completeness and self-consistency. Confirm that the specification correctly reflects the requirements, and correct the specification if it doesn't.


Step 2: Rewrite the specification: Rewrite the specification using pseudo-code as a sequence of short sentences. The use of a semiformal language like pseudo-code helps to assure that things will be stated unambiguously. Although this looks like programming, it is not programming - it is modeling. We can use the link list notation because it's easier.

We need to pay special attention to predicates. Break up compound predicates to equivalent sequences of simple predicates. Watch for selector nodes and document them as simple lists. Remove any "ANDs" that are not part of predicates - break the sentence in half instead.


Step 3: Number the sentence uniquely. These will be the node names later.


Step 4: Build the model. We can program our model in an actual programming language and using the programmed model as an aid to test design.

Few tips for effective modeling:


a) Compound predicates should be avoided in the model and spelled out (e.g., replaced by equivalent graphs) so as not to hide essential complexity.

b) Use a truth table instead of a graph to model compound predicates with more than three component predicates.

c) Segment the model into pieces that start and end with a single node and note which predicates are correlated with which in all other segments.

d) Build the test paths as combinations of paths in the segments, eliminating unachievable paths as we go ahead.

e) Use contradictions between correlated predicates to rule out combinations wholesale.

Step 5: Verify the model – since tester’s work is as bug prone as that of the programmers.

Step 6: Select the test paths.

Few tips for effective path selection:

a) Pick enough paths through the model to assure 100 percent link coverage. Don't worry about having too many tests.

b)) Start by picking the obvious paths that relate directly to the requirements and see if we can achieve the coverage that way.

c) Augment these tests by as many paths as needed to guarantee 100 percent link coverage.


Step 7: Sensitize the test paths: paths were picked up by first interpreting the predicates along the path in terms of input values. That is, select input values that would cause the software to do the equivalent of traversing our selected paths if there were no bugs.

The interpreted predicates yield a set of conditions or equations or inequalities such that any solution to that set of inequalities will cause the selected path to be traversed. If sensitization is not obvious, check the work for a specification or model bug before investing time in equation solving.

Step 8: Predict and record the expected outcome for each test.

Step 9: Define the validation criterion for each test.

Step 10: Run the tests.

Step 11: Confirm the outcomes.

Step 12: Confirm the path.

Assumptions about bugs targeted by Control Flow Testing:


1) Majorities of bugs are able to uncover control flow errors or misbehavior.

2) Bugs have direct impact on control flow predicates or it is possible that the control flow itself might be incorrect.

Pros & Cons of Control Flow Testing:

1) These days we use structured programming languages & as such control flow bugs get reduced dramatically. For older applications build with assembly language or COBOL etc. such control flow bugs had been quite common.

2) Control flow testing is not the best technique to use, while computational bugs which do not have impact on the control flow may not be detected by this technique. We can use data flow testing & domain testing to unearth such bugs.

3) We won't be able to detect any missing requirement unless, our model had included this it missed the attention of the programmer.


4) We won't be able to detect unwanted features, which happened to get included in the model, but were not present in the requirements.


5) If the programmers have already done thorough unit testing, there is remote likelihood of detection of new bugs by control flow testing technique.

6) If the same person has written the program & the test model, there is a remote chance of detection of missing features & paths. However if someone else has designed the control flow tests more efforts have to be pumped in to detect paths and features that leave the program.

7) It is difficult to have correct software merely by a coincidence, however such an eventuality defeats the control flow testing technique unless we had verified all intermediate calculations & predicate values.


Automation of Control Flow Testing Process:


As of now commercial tools directly supporting the behavioral control-flow testing are not available, but many tools are available that support structural control-flow testing. We can use these tools by actually programming our models in a supported programming language, like C, Pascal, or Basic.

If we have created a properly detailed graph model, means we have done most of the work required to express the semiformal model as a program.

It may be borne in mind that programming a model is definitely not the same as programming the real thing. The major difference is that we don't have to be concerned with all the real life stuff, like data base access, I/O, operating system interfaces, environment issues including remaining stuff where the real bugs are born.

The model program need not include many details like it doesn't have to work on the target platform, it doesn't have to be that efficient, and most important of all, it doesn't have to be integrated with the remaining software.

Then the question comes as to what is the use of this model? When it is not at all the same as running tests on the actual program. Then how should we debug our tests? The model is used as a tool to help in designing a covering set of tests, to help pick and sensitize paths, and to act as an oracle for the real software. If we can create a running model, then we can use commercial test tools as well on it & that could make our job much easier.

Friday, September 24, 2010

Reading XML sibling Nodes

Const XMLDataFile = "C:\Documents and Settings\kalyani.g\Desktop\detailedReport.xml"
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
xmlDoc.Load(XMLDataFile)
xmlDoc.SetProperty "SelectionLanguage", "XPath"
Set NodeList = xmlDoc.selectNodes("//Measure[Type='Page data[kB]']")
msgbox(NodeList.Item(0).getAttribute("name"))
msgbox(NodeList.Item(0).getElementsByTagName("Sum")(0).text)

Wednesday, September 15, 2010

QTP Quick Reference Card

VSTS - Adding Different Types of Data Sources to a Web Test


Data binding is one of the more useful features of a web test. It allows you to have a different set of data used for each iteration of a web test. For example, suppose you have a list of users you would like to simulate using your web application. You could add a data source which contains the list of users and passwords. Then you would bind this data source to the user name and password fields on your login request. Now each iteration of the web test will simulate a different user. The following are instructions for adding some of the most common types of data sources to a web test.
Adding a CSV Data Source
Follow these steps to add a CSV file as a data source

1) Create a directory to hold your CSV file
2) Place your CSV file in the directory and make sure the file has a header row
3) In the Web Test Editor click the Add Data Source button on the toolbar.
4) Select “Microsoft Jet 4.0 OLE DB Provider” from the OLE DB Provider drop down.
5) In the server or file name text box, enter the directory that the CSV file exists in. Do not enter the file name; just enter the directory where the file is located.
6) Click the advanced button.
7) Click on Extended Properties.
8) Set the value equal to: text
9) Click Ok to close the advanced editor.
10) Click Ok to close the connection property dialog.
11) Click the check box for the files with the data you would like to use for this test case then click Ok.
12) Now the text file is ready to use a data source.



Adding an Access Database as a Data Source
After setting up the database, perform the following steps to add the data source.

1) In the Web Test Editor click the Add Data Source button on the toolbar.
2) Select “Microsoft Jet 4.0 OLE DB Provider” from the OLE DB Provider drop down.
3) In the server or file name text box, enter the directory and file name of the access database. i.e. c:\temp\databinding.mdb
4) Click Ok to close the connection property dialog.
5) Choose the tables you would like to include for data binding then click Ok. Now the access database is ready to use a data source.


Adding a SQL Server Database as a Data Source
After setting up the database, perform the following steps to add the data source.
1) In the Web Test Editor click the Add Data Source button on the toolbar.
2) Select “Microsoft OLE DB Provider for SQL Server” from the OLE DB Provider drop down.
3) In the server or file name text box, enter the database server
4) Enter the username and password or select the “Use Windows NT Integrated Security” option.
5) If you entered a username and password check the “Allow saving password” checkbox.
6) Choose the database name from the dropdown list.
7) Click Ok to close the editor.
8) Choose the tables you would like to include for data binding then click Ok. Now the SQL Server database is ready to use a data source.


Adding an Excel Spreadsheet as a Data Source
One excel worksheet can define multiple tables that can be used for data binding. In order to use an Excel spread sheet as a data source, you need to do the following.

1) Create an excel worksheet.
2) The first row of your table should be column headers. You can have multiple tables on one work sheet or spread the tables across multiple worksheets. The following steps need to be done for each table which will be used.
3) Highlight the entire table including the column headers.
4) On the insert menu point to name and then click define.
5) Type a name for this selection and click Ok.
6) This process needs to be done for each table in the workbook that will be used for data binding.
7) When you are done save the workbook and exit excel.
Note: If you add more rows to a table after you define it, you will need to update the definition by doing this process again. Otherwise the new data will not be available for testing.


The next step is to add the data source to the test case. Follow these steps for that process

1) In the Web Test Editor click the Add Data Source button on the toolbar.
2) Select “Microsoft Jet 4.0 OLE DB Provider” from the OLE DB Provider drop down.
3) In the server or file name text box, enter the directory and file name of the excel spreadsheet. i.e. c:\temp\book1.xls
4) Click the advanced button.
5) Click on Extended Properties.
6) Set the value equal to: Excel 8.0
7) Click Ok to close the advanced editor.
8) Click Ok to close the connection property dialog.
9) Choose the tables you would like to include for data binding then click Ok. Note: The worksheet names appear in this list with a $ after them. You can use these for table data. If you try to use these, the test will hang. You need to select the name you gave the table in your worksheet.
10) Now the excel file is ready to use a data source.


Additional Considerations when adding a Data Source
If you are going to be executing a web test on a Controller/Agent setup, you need to consider the location of the data source before creating the connection string. The data for a data source is loaded on each agent machine. So if you create a data source and set the location to c:\test\datadinding.mdb because this is were it is located on the client machine, the agent will also expect the MDB file to be located in the same location on the agent machine. There are 2 options for handling this problem:

1) Place your data sources on a network share that each agent can access. So when you create the data source, you would use some like \\machine\datasources\datadinding.mdb. Since each agent has access to this location, the connection string will work for each agent.

2) The other option is to copy the data source to the same location on each agent machine. So if you create your connection string with c:\test\databinding.mdb, then you would need to create a c:\test directory on each agent and copy the databinding.mdb file to the directory.


http://blogs.msdn.com/b/slumley/archive/2006/12/15/adding-different-types-of-data-sources-to-a-web-test.aspx

RepositoriesCollection utility

RepositoriesCollection utility object introduced in QTP 9.2 allows adding a Object Repository dynamically to a Action. The code shown below demonstrates how to add a object repository at run-time
RepositoriesCollection.Add "C:\Test.tsr"
The code above associates the Object Repository to the current action. But when the same code is added to a library and associate with the test, QTP throws an error “Cannot perform the operation because the action is a read-only action.”.
The reason this error occurs is that library files are loaded first and then the Actions. When the code run inside the library file, QTP tries to associate it with the current action. Since the Actions are not loaded yet the RepositoriesCollection object associates the Repository permanently to the test’s first Action. This is a bug in RepositoriesCollection as it is never supposed to associate the Object Repository permanently.
Fixing the issue
Fixing the issue is pretty simple. We can either move the code from the library file to the Action or we can put the code in a function inside library file and later call the function inside the Action


Inside library file
Function LoadOR()
RepositoriesCollection.Add "C:\Test.tsr"
End Function

'Inside the action
Call LoadOR()