Wie werden Laufergebnisse von QTP in einer Word-Datei gespeichert?
Nachdem ich meine Skripte in UFT ausgeführt habe, möchte ich die Ergebnisse in einem Word-Dokument speichern, das denselben Namen wie meine Tests hat oder testrelevant ist, damit ich leicht unterscheiden kann, welches Ergebnis zu welchem Test gehört.
ann mir jemand dabei helfe
Hier ist der Code:
Dim oWord
Set oWord = CreateObject("Word.Application")
oWord.Documents.Add
oWord.ActiveDocument.Saveas "C:\Users\Desktop\RunResults\TestForWordDocResults2"
Dim oWordTestPath
oWordTestPath = "C:\Users\Desktop\AutomationScripts\TestForWordDocResults"
' Launch QuickTest
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Run the Test
qtApp.Open oWordTestPath, False ' Open the test
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") 'Create the Run Results Options object
testResults = "C:\Users\Desktop\RunResults"
' Original location for the test results.
qtResultsOpt.ResultsLocation = testResults ' Specify the location to save the test results.
oWordTestPath.Run qtResultsOpt, True ' Run the test and wait until end of the test run
' Close QuickTest Professional
qtApp.Quit
Was dieser Code bewirkt: Er erstellt ein Word-Dokument, speichert jedoch keine Ausführungsergebnisse.
P.S. Ich möchte Laufergebnisse mit einem Treiberskript speichern, nicht mit "Optionen" in UFT