Need UFT Run Session Export Location as Variable in Script
Tags:
Question ID: 105695
1
0

I need the UFT Run Session Export Location as a Variable in my test script (Tools > Options > General > Run Sessions > Automatically export run results when run session ends > Configure > Export Location’s full path). I’m hoping to use this same output location for other important info necessary to document a test run (e.g., be able to co-locate the export PDF with the screenshots captured during a run). Any help?

Marked as spam
Posted by (Questions: 424, Answers: 91)
Asked on October 30, 2014 5:56 pm
200 views
Answers (1)
1
Private answer

This is taken from the UFT AOM (Automation Object Model). It is code to change run results (and is modified to use a variable, which is what you're asking for). You probably don't need all of the settings shown in the below code, but they are included just in case (you'll most likely only need the first few lines which deal with the results). Hope this helps.

++++++++++++++++++++++++++++++++++++

Code:

myResultsLocation = ''C:TestsTest1Res1''

Set qtResultsOpt = CreateObject(''QuickTest.RunResultsOptions'') ' Create the Run Results Options object

qtResultsOpt.ResultsLocation = myResultsLocation ' Set the results location

Set qtAutoExportResultsOpts = qtApp.Options.Run.AutoExportReportConfig

qtAutoExportResultsOpts.AutoExportResults = True ' Instruct UFT to automatically export the run results at the end of each run session

qtAutoExportResultsOpts.StepDetailsReport = True ' Instruct UFT to automatically export the step details part of the run results at the end of each run session

qtAutoExportResultsOpts.DataTableReport = True ' Instruct UFT to automatically export the data table part of the run results at the end of each run session

qtAutoExportResultsOpts.LogTrackingReport = True ' Instruct UFT to automatically export the log tracking part of the run results at the end of each run session

qtAutoExportResultsOpts.ScreenRecorderReport = True ' Instruct UFT to automatically export the screen recorder part of the run results at the end of each run session

qtAutoExportResultsOpts.SystemMonitorReport = False ' Instruct UFT not to automatically export the system monitor part of the run results at the end of each run session

qtAutoExportResultsOpts.ExportLocation = ''C:Documents and SettingsAll UsersDesktop'' 'Instruct UFT to automatically export the run results to the Desktop at the end of each run session

qtAutoExportResultsOpts.UserDefinedXSL = ''C:Documents and SettingsAll UsersDesktopMyCustXSL.xsl'' ' Specify the customized XSL file when exporting the run results data

qtAutoExportResultsOpts.StepDetailsReportFormat = ''UserDefined'' ' Instruct UFT to use a customized XSL file when exporting the run results data

qtAutoExportResultsOpts.ExportForFailedRunsOnly = True ' Instruct UFT to automatically export run results only for failed runs

Marked as spam
Posted by (Questions: 0, Answers: 771)
Answered on October 30, 2014 5:57 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top