Q:

Visual Studio load test setting parameters for command line

I have a load test project that I run regularly from the Visual Studio using the Load Test GUI.  I would like to run that test from the command line by changing its parameters such as the number of users, run duration etc.  
In visual studio load test, there are usually 3 type of settings that I usually play around.  

Test setting: for general controller and agent assignments.  
Run settings: in which I set the run duration, where to save the logs of the test results etc. 
Scenario settings: used to set the load pattern and test mix etc. 

Ideally I should be able to change any of these settings using some command line parameters of MSTEST utility or assigning a setting file for each goal, however I haven't been able to accomplish that setting change using the MSTEST command line options.  I am able to run the load test using the state where I left off before exiting the GUI, however I cannot set the runsetting that is not currently active or I cannot change the user load defined in the scenario settings.  
For my current task, being able to change the user load from the command line is more urgent than changing other parameters.  So if someone knows how to change Scenario Settings from the command line that would be great help.  I already tried creating more than one scenario with different number of users however in Visual Studio, seems like it is not possible to select particular scenario and execute test using it.  Once the load test starts, it runs every available scenarios sequentially.  So I think for my purpose I should create only one scenario and be able to change the user load from command line somehow. 
Thanks for the help in advance.  

A:

As far as I know, none of those items are available as command line options or similar.  But all, or possible just most, are available programmatically via a load test plugin.  One possible solution for you is to set the required values in the LoadTestStarting event.  The values could be read from a file or from environment variables; you choose what values are available and how to represent them. 
This Microsoft blog introduces load test plugins and has several examples.