I have prowled through the QTP 9.2 docs and this forum, but find no answer to the following setup question:
I have now setup a shared Object Repository for my first test script. When I am finished with my Basic Acceptance Test (BAT) suite, I will have between 30 to 40 test scripts that will all use this shared repository.
While I anticipate that most of these test scripts will be simple, and probably only require a single Action or two, I find by experimentation that I must interactively associate <u>each</u> Action in a test script with the shared OR (in order that all scripts and Actions use the same OR).
But what I want to tell QTP is, "associate this entire <u>script</u> with this or that shared OR". Is there anyway to do this?
QTP's use of the Action concept is cumbersome at best. The atomic unit for development is the test Script (i.e. only one person can edit a script and all of its Actions are one time), so why are Actions given the notion of modularity? If the addition and setup/associating of each new Action is difficult, I suspect that many scripters will simply write a test as one long honkin' Action.
But then, have I again missed something here? (which happens much more often than I like...)
My take is that they created actions within scripts to facilitate some of the keyword-driven stuff, like iterations for example, without having to go to expert view and create loops or other programming structures that can be handled with the action structures instead, and also to enable reusable actions without having to create a function library.
So, I believe actions are the "simplified" scripting approach to avoid many "programming" features and make QTP available to a wider audience (i.e. people with no development experience).
Which sometimes causes me frustration, such as having to jump through hoops to create action parameters, create test parameters, and associate them with each other, just to pass parameters from one action to another - much harder than simply passing parameters to a function in a function library.
In short, QTP's "simplification" might make it easier for non-developers to write more sophisticated scripts, but it makes it harder for expert users to hack through all the "simplifications" to do it our own way.