Как сохранить результаты выполнения из QTP в файл слова?
После того, как я запустил свои сценарии в UFT, я хочу сохранить результаты в текстовом документе, который будет иметь то же имя, что и мои тесты, или иметь отношение к тесту, чтобы я мог легко определить, какой результат принадлежит какому тесту.
Кто-нибудь может мне помочь с этим?
Вот код:
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
Что делает этот код: он создает документ Word, но не сохраняет результаты запуска.
Постскриптум Я хочу сохранить результаты выполнения, используя скрипт драйвера, а не "параметры" в UFT