yingkai1208
10 years agoContributor
AQtime.GetResults
Hi,
When I run the following code in TC 10, and try to use AQtime to profile it.
Dim appPath
AppPath = TestedApps.AQtime.FullFileName
' Checks AQtime version
If AQtimeIntegration.IsSupportedVersionAvailable (7) = true Then
' Creates a new project
AQtimeIntegration.AQtime.CreateProjectFromModule(AppPath)
' Selects the desired profiler
AQtimeIntegration.AQtime.SelectProfiler("Function Trace Profiler")
' Starts profiling
AQtimeIntegration.AQtime.StartProfiling
' Runs the Test routine
An action is executed here
' Gets results and exports it to XML files
AQtimeIntegration.AQtime.GetResults(20000)
Call AQtimeIntegration.AQtime.ExportCurrentResults("C:\SummaryResultsFile.xml", "C:\ResultsFile.xml")
' Pauses the script execution until the profiling run is over
AQtimeIntegration.AQtime.WaitForEndOfProfiling
' Closes AQtime
AQtimeIntegration.AQtime.Close
Else
Call Log.Error("You should install AQtime version 8")
End If
The test failed at AQtimeIntegration.AQtime.GetResults(20000), the error message is This operation can be performed during profiling only
Image 1 is the AQtime settings in TC, and image 2 is the log file.
Why the test failed in AQtime.GetResults?
Thanks in advance.
Cheers
Kai
When I run the following code in TC 10, and try to use AQtime to profile it.
Dim appPath
AppPath = TestedApps.AQtime.FullFileName
' Checks AQtime version
If AQtimeIntegration.IsSupportedVersionAvailable (7) = true Then
' Creates a new project
AQtimeIntegration.AQtime.CreateProjectFromModule(AppPath)
' Selects the desired profiler
AQtimeIntegration.AQtime.SelectProfiler("Function Trace Profiler")
' Starts profiling
AQtimeIntegration.AQtime.StartProfiling
' Runs the Test routine
An action is executed here
' Gets results and exports it to XML files
AQtimeIntegration.AQtime.GetResults(20000)
Call AQtimeIntegration.AQtime.ExportCurrentResults("C:\SummaryResultsFile.xml", "C:\ResultsFile.xml")
' Pauses the script execution until the profiling run is over
AQtimeIntegration.AQtime.WaitForEndOfProfiling
' Closes AQtime
AQtimeIntegration.AQtime.Close
Else
Call Log.Error("You should install AQtime version 8")
End If
The test failed at AQtimeIntegration.AQtime.GetResults(20000), the error message is This operation can be performed during profiling only
Image 1 is the AQtime settings in TC, and image 2 is the log file.
Why the test failed in AQtime.GetResults?
Thanks in advance.
Cheers
Kai