Question

I'm writing a script to trigger several VSTS load tests in a row using mstest.exe. I notice there's a /resultsfile option that lets me specify where the test results are stored, but it looks like this will only save a .trx file (which seems to be tied to the controller's test run database).

I would like to export this result to an .ltrar file (which extracts the actual result data, so it can be imported elsewhere). I currently do this by hand from the "Open and Manage Load Test Results" dialog (select my controller, select the test from the load test results history, and click "Export..."). Is there a way to do this from the command line?

Was it helpful?

Solution

You can configure the controller to save the results to a text file and the location of the textfile is added to the .trx file. e.g.

<WebTestResultFilePath>C:\Dev\LoadTest\TestResults\MACHINENAME 2009-12-09 13_35_13\In\f6e591f1-219e-45be-94aa-c9995107817e\LoadTestCoded.webtestResult</WebTestResultFilePath>

It would work okay if you created a simple stored procedure to export the results straight from a database though. You can deal with larger files etc.

Then you can commandline an SQL command to export the data you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top