I'm starting using QTP to write data driven tests.
Reading lot of topics on forums about QTP, it seems that Test Design Studio will help me for my tests.
I downloaded it to evaluate it, but I'd like to have some project samples to see how to use it efficiently.
Does anyone know where I can get some samples ?
Thanks for those samples.
But I still have a question :
- In the ReporterManager project, in the ReporterDemo test, you use in the action the object instance oReporterManager. When is it created ? I see the instanciation in ReporterManager.vbs. Is that means that every global variable in every script file is instanciated when the test run starts (in QTP) ? In which order if multiple files contain global variables (and statement) ?
SebDuval - if you link a .vbs file to a QTP test, the commands in the .vbs file will be executed once QTP starts to run. This means that if you have any code outside a function or a subprocedure, it will be immediately executed. And in this case, the "Set oReporterManager = new ReporterManager" command will create a new instance of the class and load it into the global variable. This has nothing to do with TDS - it's caused by the way QTP loads external libraries.
I'm used to working with .vbs extensions, but it's completely a matter of coding habits. You can even store your external procedures in a .txt file, and it wouldn't matter - QTP will be able to associate them just like .vbs or .qfl files.