I'm currently trying to run some QTP/UFT test scripts that are saved on our company's ALM server from a VBScript. I am doing this because I want these scripts to get run from our continuous integration server and our current CI server does NOT have a mechanism for executing QTP scripts similar to the HP-ALM addin for Jenkins. I am able to save the results and view them when I open up UFT and run the scripts, but this does not solve my current problem because then I have to manually open up the script and run it. I'm trying to eliminate the overhead of manual kicking off scripts when a continuous integration server can do it for me. I am setting my results location by
Set qtpResultsOptions = CreateObject("QuickTest.RunResultsOptions")
qtpResultsOptions.ResultsLocation = "C:\Path\To\Save\Folder"
test.Run qtpResultsOptions
However, nothing gets saved there. To make matters even stranger, if the "Folder" is already present, it runs the test and then that folder is removed, but it doesn't go to the Recycle Bin. However, if I specify the results location as C:\Path\To\Save\Folder\Results.xml
then it retains that folder, but doesn't save anything there. I will likely have to clear things after this post, but the behavior is bizarre and I don't have any idea what to do.
I really do feel you need to edit your original question to include MUCH more information, for me there are a lot of moving parts and questions I'd want answered to be sure I'm answering the question.
But for now as you're working locally, how about we take things to a simpler level, you're working from a script, why?
I just jumped onto UFT and was able to get it to export the run results anywhere I wanted. I did this buy going to:
Tools -> Options -> General -> Run Sessions
You should now be faced with this screen:
Make sure you tick the automatically export run results when run session ends checkbox and click on Configure...
You should now be faced with the following screen:
Just define your export location and set it up how you want it, does this work? For me it worked locally and also when exporting across the domain to another machine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With