Reputation: 55
I can specify a think time for my visual studio 2012 load test. But is it possible, to give the think time a factor like: 40*{{factor}}
If factor = 2, my think time is 80s
Upvotes: 1
Views: 525
Reputation: 9783
I am not sure if this will work, but you can give it a try.
Create a LoadTest plugin and in the Initialize method set the DelayBetweenIterations
value you want:
public class Plugin : ILoadTestPlugin
{
private Microsoft.VisualStudio.TestTools.LoadTesting.LoadTest _mLoadTest;
public void Initialize(Microsoft.VisualStudio.TestTools.LoadTesting.LoadTest loadTest)
{
_mLoadTest.Scenarios[0].DelayBetweenIterations = 40 * factor;
}
}
Add your plugin to your load test by right click to the load test --> Add Load Test PlugIn...
Upvotes: 1