Access Performance Data

In order to access the results of a performance test in code, you will need to create a Test Studio execution extension. The following code sample is an example of accessing the performance results. Specifically, it writes the server and client time for each step in the performance test.

public override void OnAfterTestCompleted(TestResult result)
string filePath = result.ProfilerResultsPath;
ProfilerResultsFile resultsFile = ProfilerResultsFile.Load(Guid.Parse(result.Id.ToString()), filePath);
    foreach (ProfilerTestStep step in resultsFile.Steps)       {
Public Overrides Sub OnAfterTestCompleted(result As TestResult)
    Dim filePath As String = result.ProfilerResultsPath
    Dim resultsFile As ProfilerResultsFile(Guid.Parse(result.Id.ToString()), filePath)
    For Each [step] As ProfilerTestStep In resultsFile.Steps
End Sub

Telerik.TestStudio.Interfaces.dll should be added into the project as well as the following using statements:

using ArtOfTest.WebAii.Design.Execution.Profiler;

using ArtOfTest.WebAii.Design.Execution.Profiler.Storage;