locked
Get load test information at runtime RRS feed

  • Question

  • Hi

    i am running load test from unit test project and i need to fetch the load test execution ID at runtime in order to see the information it gathered in the SQL DB 

    how can i get execution information at runtime? i noticed it has LoadTest object but i was not able to fetch it's information

    thanks.

    Wednesday, December 30, 2015 2:27 PM

Answers

All replies

  • Hi micha.azran,

    >>how can i get execution information at runtime?
    What execution information do you want to get at runtime? When running Load Test, we can see some execution information in Graphs tab. It will draw the information on the graphs based on the Sampling Rate one by one.


    Best Regards,
    Weiwei

    Thursday, December 31, 2015 10:11 AM
  • I want to know in the code side what is the run ID, instance ....

    in order to validate the results in the SQL DB

    is there an object i can monitor during the execution from the C# code which will hold the information?

    Thursday, December 31, 2015 10:16 AM
  • Hi micha.azran,

    >>is there an object i can monitor during the execution from the C# code which will hold the information?

    Yes, the LoadTestContext class you can monitor during the execution from C# code which will hold the LoadTestRunId property.
    https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.loadtesting.loadtestcontext.loadtestrunid.aspx

    Best Regards,
    Weiwei

    • Proposed as answer by Weiwei Cai Monday, January 4, 2016 8:12 AM
    • Marked as answer by micha.azran Monday, January 4, 2016 8:39 AM
    Friday, January 1, 2016 3:04 AM