How to dynamically load Environment Var and Datatabel resources from ALM?
I have created QTP 11.0 tests and stored them in ALM 11.0. I have also created an Environment Variables file and multiple Datatable resources for these tests and stored those in ALM 11.0 in the Resources area. In QTP in the test script Settings I have hardcoded the Environment Variables file and Datatable resources locations.
What I would like to do is enable these items to be set from outside of the test script settings, and have the script pick them up and load them when it starts. What I am trying to solve is a need to make multiple copies of theses test script/cases in the Test Lab (for instances, in different test sets), direct the test scripts in a given Test Set to access a different Environment Variables File and different Datatable Resources then the same test script/cases in another test set. In this way I hope that QA can have a set of environment variables and datatable resources used when they execute the tests (in the QA Test Set), and developers can create a different set of environment variables and datatable resources to be used when they execute their separate copy of the tests (in the Dev Test Set).
The examples in the QTP help files all show script code where the script launches QTP itself, loads the test, and then loads these resources from the file system. I need to do this in the context of executing the tests from within ALM 11.0.
I'm continuing to research, but suggestions are welcome.
Thanks for the suggestion, Brendan. That is not an option that came to my mind. I will definitely look into it.
Would you happen to have any sample QTP code showing how to load an attachment that is stored in QC, and then assign that as either the Environment Variables file or the Datatable Resource? Of course I will try to figure it out on my own. If you had any code hints readily available, though, they would be most welcome.