Visual Studio : Resolving the LoadGeneratorLocationError

Melissa Connors

Published On: March 8, 2017

Categories: Testing, Visual Studio 3

I use Visual Studio for performance testing and overhead analysis with the SentryOne products. Currently, I have Microsoft Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3 installed. Since the first edition of 2015 (possibly even Visual Studio 2013), I've received a LoadGeneratorLocationError during each Load Test execution.

The LoadGeneratorLocationError
Type Subtype Count Message
Test Error LoadGeneratorLocationError 1 Geo locations configured with load test will only be honored with load
test runs using Visual Studio Team Services and will be ignored while
running your load test on-premises.

Visual Studio Load Test Error

Since I am running the test locally, this error is noise. Furthermore, no one wants to see an error in an otherwise successful test. It simply ruins the final results report. In addition, when the Load Test was created, "On-premise Load Test" was selected, which makes this frustrating. Possibly more frustrating is that it's called "On-premise" when you get started in the New Load Test Wizard.

Visual Studio New Load Test WizardVisual Studio New Load Test Wizard

I continued through the wizard and created the example Load Test shown below.

Load Test Example Default Location Properties
Visual Studio Example Load TestVisual Studio Example Load Test Visual Studio Location Default PropertiesVisual Studio Location Default Properties

First, if I right-click on the Location --> Default I have only the options to "Set Location for Cloud-based Load Tests" or go to "Properties". As you may have noticed in the image above, there's not anything I can set for "Properties" as-is.

Next, I'll run the Load Test with the default settings. Now, you can see that the error appears on the Load Test Results output.

Visual Studio LoadGeneratorLocationErrorVisual Studio LoadGeneratorLocationError

The Resolution (Work-Around)

Due to the emotional stress caused by this error appearing on all of my results, I sought a way to make it disappear. So far, the only way I know how is to edit the LoadTest as an XML file.

First, right-click on a .loadtest file in Solution Explorer and select "Open With".

Visual Studio loadtest Open WithVisual Studio loadtest Open With

Second, select the XML (Text) Editor in the "Open With" window.

Visual Studio loadtest Open With WindowVisual Studio loadtest Open With Window

Then, find the "LoadGeneratorLocations" tag, and delete the three lines I have highlighted. They should be located near the end of the file.

        <GeoLocation Location="Default" Percentage="100" />

Visual Studio loadtest Edit XMLVisual Studio loadtest Edit XML

Next, click the Save icon and close the XML window.

Visual Studio loadtest Edited XML SavedVisual Studio loadtest Edited XML Saved

Finally, right-click the .loadtest file again in Solution Explorer and Open With "Load Test Editor (Default)" so it opens normally instead of with the XML Editor going forward.

Now, when the test executes, there are no more errors (well, not any for LoadGeneratorLocationError anyway).

Visual Studio loadtest No ErrorsVisual Studio loadtest No Errors

Fantastic! That's what everyone wants to see at the end of a test.

I hope this workaround is useful. Even more so, I hope Visual Studio 2017 requires no workarounds to avoid this error.

Melissa is the Product Education Manager at SentryOne. Melissa has over a decade of experience with SQL Server through software performance and scalability testing, analysis and research projects, application development, and technical support.


Fighting Downtime and Slowdowns