Last active
September 30, 2020 23:09
-
-
Save LarrysGIT/8b7a96f5cfee7908efb439da9f3d7f2c to your computer and use it in GitHub Desktop.
visual studio, load test results, LoadTestExporterImporter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# References, | |
# https://stackoverflow.com/questions/46671790/how-to-export-visual-studio-load-test-results-in-ltrar-format | |
# http://answers.flyppdevportal.com/MVC/Post/Thread/07f025fb-67ad-4569-b10d-b8913a575a3a | |
# Import the API | |
[System.Reflection.Assembly]::LoadFrom("C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.QualityTools.LoadTest.dll") | Out-Null | |
[System.Reflection.Assembly]::LoadWithPartialName("LoadTest") | Out-Null | |
# SQL connectionstring of results store | |
$ConnectionString = "Server=(localdb)\MSSQLLocalDB;Database=LoadTest2010;Integrated Security=True;" | |
$temp = New-Object Microsoft.VisualStudio.TestTools.WebStress.LoadTestExporterImporter($ConnectionString) | |
# 1 means result id, from the following query | |
# select LoadTestRunid from LoadTestRun | |
$temp.Export(1, "C:\Temp\1.ltrar") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment