VSTS 2010 Load Test Feature – Multiple Loadtest Plug-ins
If you haven’t yet heard, Visual Studio Team System 2010 has reached Beta 1 and is available for public download. (You can find a copy of it here). Over the next few days my colleagues and I will be writing up information about some of the most anticipated features for the load testing portion of the product. If you haven’t yet checked out Ed Glas’s listing of the newest web and load test features, I recommend taking a look. As we write up more of these blog entries, he will link to them directly from his list.
In this post, I’m going to describe how (and why) to use multiple load test plug-ins with your load tests. If you want to run code at specific times during the loadtest, the best way to do that is to write a loadtest plug-in. Prior to Visual Studio 2010 this functionality was available, but you were limited to one plug-in per loadtest. This can be less than ideal if you want to create reusable plug-in code since all of the code had to be crammed into the same plug-in, regardless of whether it was logically similar to do so. In Visual Studio 2010 we’ve made this quite simple.
1) Add your test plug-ins to your project and compile the project.
2) After creating your loadtest, right click on the test node in the loadtest editor, and choose “Add Load Test Plug-in”
3) Select the plug-in you wish to add. From here, you can view its properties and set the initial values you wish for them to have at run time. Note that you can expose as many properties as you want from your plug-ins; just make them public, settable, and of a base type such as Integer, Boolean, or String.
4) Click “Ok”, and the newly added Load Test plug-in will be shown in the editor tree.
5) Repeat the process to add as many plug-ins as your loadtest will need.
6) If you’re worried about the order the plug-ins will execute, just click and drag the plug-ins to rearrange them. They will run in the order you have listed.
Comments
Anonymous
June 11, 2009
PingBack from http://blogs.msdn.com/edglas/archive/2009/05/18/dev10-beta-1-available.aspxAnonymous
May 25, 2010
Can you please explain how to expose the properties for Loadtest pluginAnonymous
May 26, 2010
Properties which are exposed to the UI are properties in the plugin which are made public. For example: private string m_StringProperty; public string MyStringProperty { get { return m_StringProperty; } set { m_StringProperty = value; } }