| || |
I'm trying to write my own batch program since MTM is so unpredictable with QTP 9.x
I'm using LastRunResults.Path (property of the object Test) to see the path of my latest test result. However because sometimes I set my qtp to use temp location to store its results (only for debugging purpose), the test run results ends up using a temp location.
Does anyone know how to make the test run results to always use a new default folder (<QuickTest installation folder>\Tests\TestName\<ResX>?
I don't want to use a specific folder path either (obj.ResultsLocation = "C:\Test\TestName\Res2) since I want QTP to figure out which unique folder ResX to use.
Thanks in advance.
I think you will have to code that yourself.
Something like this
<font class="small">Code:</font><hr /><pre>
Set oFSO = CreateObject("Scripting.FileSystemObject")
i = 1
While Not oFSO.FolderExists("C:\test\Res" & i)
obj.ResultsLocation = "C:\test\Res" & i
Note: this code has not been tested. You will probably need to put in some check to make sure it doesn't get into an infinite loop.
Ah ok, I was just curious if there's any ways to keep the default LastRunResult method.
Thanks for the reply!