{"id":10662,"date":"2015-12-08T15:56:59","date_gmt":"2015-12-08T15:56:59","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2015\/12\/08\/creating-load-test-plugins-for-cloud-based-load-test\/"},"modified":"2022-08-02T07:19:30","modified_gmt":"2022-08-02T15:19:30","slug":"creating-load-test-plugins-for-cloud-based-load-test","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/creating-load-test-plugins-for-cloud-based-load-test\/","title":{"rendered":"Creating Load Test Plugins for Cloud-based Load Test"},"content":{"rendered":"<p>This week I have had two questions that involved the need to create a load test plugin.\u00a0\u00a0 In the latest scenario the person wanted Cloud-based load test to ramp up the user count randomly.<\/p>\n<p>Yes plugins work the same for both on-premises and Cloud-based load testing.\u00a0 In this post i will walk through creating a load test plugin that randomly increments the user count every second (this is how often the heartbeat event is fired).<\/p>\n<p><strong>Step 1. Create a new load test<\/strong><\/p>\n<p>With Visual Studio Enterprise click on the File menu and click New > Project and choose Web Performance Test<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/3302.image_thumb_637CEAB4.png\" width=\"594\" height=\"412\" \/><\/p>\n<p><strong>Step 2.\u00a0 ****Add a reference to the Load Test Framework<\/strong><\/p>\n<p>From within your solution right click on the project and select \u201cAdd > References\u201d in search type \u201cLoad Test\u201d and add the the<\/p>\n<p>**QualityTools.LoadTestFrameworks **assembly<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/7127.image_thumb_1C2794C2.png\" width=\"652\" height=\"309\" \/><\/p>\n<p><strong>Step 3. Add a new class library<\/strong><\/p>\n<p>We need to extend the Load Test architecture and you do this using a class library.\u00a0 To do this right click on the project and select New Item>Class.<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/6567.image_thumb_5E9A36F8.png\" width=\"607\" height=\"421\" \/><\/p>\n<p><strong>Step 4. Implement LoadTestPlugin interface<\/strong><\/p>\n<p>In the class library you added to the solution, implement the ILoadTestPlugin interface with the code below.<\/p>\n<blockquote>\n<p>using System;<br \/>\n  using Microsoft.VisualStudio.TestTools.LoadTesting;<br \/>\n  namespace MyPlugin<br \/>\n  {<br \/>\n  \u00a0\u00a0\u00a0 public class <font color=\"#800080\"><strong>ChucksPlugin<\/strong><\/font> : ILoadTestPlugin<br \/>\n  \u00a0\u00a0\u00a0 {<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LoadTest m_loadTest;<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 int m_userload = new int();<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 #region ILoadTestPlugin Members<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 public void Initialize(LoadTest loadTest)<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 m_loadTest = loadTest;<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 m_loadTest.Heartbeat += new System.EventHandler<HeartbeatEventArgs>(m_loadTest_Heartbeat);<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 void m_loadTest_Heartbeat(object sender, HeartbeatEventArgs e) \/\/runs every second<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Random rnd = new Random();<br \/>\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 m_loadTest.Scenarios[0].CurrentLoad = m_loadTest.Scenarios[0].CurrentLoad + rnd.Next(0, 15);<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br \/>\n  \u00a0\u00a0\u00a0\u00a0 }<br \/>\n  }<\/p>\n<\/blockquote>\n<p><strong>Step 5. Add a load test to the solution<\/strong><\/p>\n<p>In your project add a new load test. To do this right click on the project and select New Item>Load Test. After you have finished with the Load Test Wizard right click on the root node and select \u201cAdd Load Test Plug-in\u2026\u201d.<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/4807.image_thumb_0C1B56BC.png\" width=\"612\" height=\"417\" \/><\/p>\n<p>In the resulting dialog you will see the name of the class you named your Plugin.\u00a0 If you used the code above you should see the name: <font color=\"#800080\"><strong>ChucksPlugin<\/strong><\/font>&#8230;<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/1602.image_thumb_476EBC7A.png\" width=\"626\" height=\"434\" \/><\/p>\n<p><strong>Step 6. Run your Load Test<\/strong><\/p>\n<p>Now when you run your load test you will see the user count increment by random amounts from 0-15.<\/p>\n<p>This plugin will work with either Cloud-based load tests or with on-premises Load Tests.\u00a0 Below is a screen of a Cloud-based Load Test \u2013note the purple user count line in the graph.\u00a0<\/p>\n<p><img decoding=\"async\" title=\"image\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/7450.image_thumb_428C08BE.png\" width=\"609\" height=\"417\" \/><\/p>\n<p>\u00a0<\/p>\n<p>I am also including below <a href=\"http:\/\/blogs.msdn.com\/b\/slumley\/archive\/2009\/04\/10\/load-test-plug-ins.aspx\">Sean Lumley\u2019s great post<\/a> on this same topic:<\/p>\n<p><strong>Load Test Plug-ins<\/strong><\/p>\n<p>This blog post is going to go over creating a load test plug-in and show a few different ways you can use a plug-in to modify your load test.\u00a0 These plug-ins are a powerful extensibility point of the load test architecture.\u00a0 They give you the opportunity to do things such as change the selected test, change the userload, add data to the web test context, modify the test environment before the test runs or clean up the environment when the test completes.<\/p>\n<h3>Overview<\/h3>\n<p>1) Here are the following events that you can connect to:<\/p>\n<p>a. Heartbeat \u2013 This event is raised every second. If you want to monitor some vairable and then modify user load based on that variable, this would be a good event to connect to.<\/p>\n<p>b. LoadTestStarting \u2013 This event is raised when the load test starts. This is a good event for things such as setting up the envoironment or maybe starting logging for a report you might want to create.<\/p>\n<p>c. LoadTestFinished \u2013 This event is raised when the load test completes. This is a good event for things such as cleaning up the envoironment or maybe stopping logging for a report you might want to create.<\/p>\n<p>d. LoadTestAborted \u2013 This event is raised if a load test is aborted.<\/p>\n<p>e. WarmupComplete \u2013 This event is raised if you are using a warmup period and when the warmup period completes.<\/p>\n<p>f. TestSelected \u2013 This event is raised when a test has been selected to be executed. You can change what test is about to be executed from this event.<\/p>\n<p>g. TestStarting \u2013 This event is raised when a test iteration is about to start. You can add items to the test context from this event.<\/p>\n<p>h. TestFinished \u2013 This event is raised when a test completes. You get information about the test that was just executed.<\/p>\n<p>i. ThresholdExceeded \u2013 This event is raised when a threshold rule has been exceeded. You are given information about the counter that caused the rule to fire.<\/p>\n<p>2) Creating a LoadTest Plug-in<\/p>\n<p>a. Open the test project that contains your load test.<\/p>\n<p>b. Add a new class file<\/p>\n<p>c. Add a using statement for<\/p>\n<p>using Microsoft.VisualStudio.TestTools.LoadTesting;<\/p>\n<p>d. Have the class implement the ILoadTestPlugin interface.\u00a0<\/p>\n<p>public class Class2 : ILoadTestPlugin<\/p>\n<p>e. There is one method in the interface that you have to implement:<\/p>\n<p>public void Initialize(LoadTest loadTest)<\/p>\n<p>f. Here is an example plugin:<\/p>\n<p>using Microsoft.VisualStudio.TestTools.LoadTesting;<\/p>\n<p>namespace TestProject3<\/p>\n<p>{<\/p>\n<p>public class PluginExample : ILoadTestPlugin<\/p>\n<p>{<\/p>\n<p>LoadTest m_loadTest;<\/p>\n<h2>region ILoadTestPlugin Members<\/h2>\n<p>public void Initialize(LoadTest loadTest)<\/p>\n<p>{<\/p>\n<p>m_loadTest = loadTest;<\/p>\n<p>}<\/p>\n<h2>endregion<\/h2>\n<p>}<\/p>\n<p>}<\/p>\n<p>g. To set the plugin on your load test, first compile the plugin. Then right click on the root node of the load test and select \u201cSet Load Test Plug-in\u2026\u201d. In the dialog that appears, select your plug-in.<\/p>\n<h3>Examples<\/h3>\n<p>Now let\u2019s create some examples.<\/p>\n<h4>Storing extra information with a run<\/h4>\n<p>The first example we will create is storing extra information along with your load test. One common question we get is I would also like to store build number or something like that with my load tests. Then the users would like to be able to use this information in a report they are creating.<\/p>\n<p>First we will create a separate table in the load test results store to hold the new info. Part of the key for all load test tables in the LoadTestRunId. Here is a simple table definition:<\/p>\n<p>CREATE TABLE &#91;dbo].[LoadTestBuildInfo&#93;(<\/p>\n<p>[LoadTestRunId] [int] NOT NULL,<\/p>\n<p>&#91;Build] [nvarchar&#93;(100) NULL,<\/p>\n<p>CONSTRAINT [PK_LoadTestBuildInfo] PRIMARY KEY CLUSTERED<\/p>\n<p>(<\/p>\n<p>[LoadTestRunId] ASC<\/p>\n<p>) ON [PRIMARY]<\/p>\n<p>So we need three things to write to this table. The connection string, the run id and the build. We will add the build information as a Load Test Context parameter. The connection string we will make an option parameter. The run id we will get from the database.<\/p>\n<p>Unfortunately, we do not give you the runid through an API, so we will just query the LoadTestRun table for the max run id. Unless you have multiple runs going at once, this will be the value you need.<\/p>\n<p>First here is a hlper class that contains the sql operations:<\/p>\n<p>using System;<\/p>\n<p>using System.Globalization;<\/p>\n<p>using System.Data.SqlClient;<\/p>\n<p>namespace ApiDemo<\/p>\n<p>{<\/p>\n<p>class SqlHelper<\/p>\n<p>{<\/p>\n<p>static string s_connectionString;<\/p>\n<p>public static void SetConnectionString(string connectionString)<\/p>\n<p>{<\/p>\n<p>s_connectionString = connectionString;<\/p>\n<p>}<\/p>\n<p>public static int GetRunId()<\/p>\n<p>{<\/p>\n<p>string sql = &#8220;SELECT MAX(LoadTestRunId) FROM LoadTestRun&#8221;;<\/p>\n<p>using (SqlConnection connection = new SqlConnection(s_connectionString))<\/p>\n<p>{<\/p>\n<p>connection.Open();<\/p>\n<p>using (SqlCommand sqlCommand = new SqlCommand(sql, connection))<\/p>\n<p>{<\/p>\n<p>using (SqlDataReader dataReader = sqlCommand.ExecuteReader())<\/p>\n<p>{<\/p>\n<p>if (dataReader.Read())<\/p>\n<p>{<\/p>\n<p>return dataReader.GetInt32(0);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>throw new Exception(&#8220;Unable to get the run id&#8221;);<\/p>\n<p>}<\/p>\n<p>public static void StoreBuild(int id, string build)<\/p>\n<p>{<\/p>\n<p>string sql = string.Format(&#8220;INSERT INTO LoadTestBuildInfo (LoadTestRunId,Build) Values ({0},'{1}&#8217;)&#8221;, id, build);<\/p>\n<p>using (SqlConnection connection = new SqlConnection(s_connectionString))<\/p>\n<p>{<\/p>\n<p>connection.Open();<\/p>\n<p>using (SqlCommand sqlCommand = new SqlCommand(sql, connection))<\/p>\n<p>{<\/p>\n<p>sqlCommand.ExecuteNonQuery();<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>Second, here is the load test plugin:<\/p>\n<p>using Microsoft.VisualStudio.TestTools.LoadTesting;<\/p>\n<p>namespace ApiDemo<\/p>\n<p>{<\/p>\n<p>public class PluginExample : ILoadTestPlugin<\/p>\n<p>{<\/p>\n<p>LoadTest m_loadTest;<\/p>\n<p>static string s_connectionString = &#8220;Data Source=&#8221;.\\SQLEXPRESS&#8221;;Initial Catalog=LoadTest;Integrated Security=True&#8221;;<\/p>\n<p>public void Initialize(LoadTest loadTest)<\/p>\n<p>{<\/p>\n<p>m_loadTest = loadTest;<\/p>\n<p>m_loadTest.LoadTestStarting += new System.EventHandler(m_loadTest_LoadTestStarting);<\/p>\n<p>}<\/p>\n<p>void m_loadTest_LoadTestStarting(object sender, System.EventArgs e)<\/p>\n<p>{<\/p>\n<p>\/\/first get the connection string<\/p>\n<p>if (m_loadTest.Context.ContainsKey(&#8220;ConnectionString&#8221;))<\/p>\n<p>{<\/p>\n<p>SqlHelper.SetConnectionString(m_loadTest.Context[&#8220;ConnectionString&#8221;].ToString());<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>SqlHelper.SetConnectionString(s_connectionString);<\/p>\n<p>}<\/p>\n<p>\/\/now we need to get the runid.<\/p>\n<p>int loadTestRunId = SqlHelper.GetRunId();<\/p>\n<p>\/\/now store the build info<\/p>\n<p>if (m_loadTest.Context.ContainsKey(&#8220;Build&#8221;))<\/p>\n<p>{<\/p>\n<p>SqlHelper.StoreBuild(loadTestRunId, m_loadTest.Context[&#8220;Build&#8221;].ToString());<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>Now that you have the build stored with the run id, you can easily add this to any custom reports.<\/p>\n<h4>Changing the Selected Test<\/h4>\n<p>This sample will show you how to change the test that the engine has selected. Maybe you have a situation in which your test mix has 4 tests. After a certain amount of time, you no longer want to run Test4. So any time it is selected, you want to replace it with one of the other 3. You can do this from the TestSelected event. We will also use the heartbeat event to keep track of how much time has been executed. In the heartbeat event, we will increase a counter once warm-up is complete. Then in the TestSelected event, after 120 seconds, we will always switch WebTest1 with WebTest2. You can make this more intelligent by selecting a test from the list of tests in the scenario specified in the event args.<\/p>\n<p>using Microsoft.VisualStudio.TestTools.LoadTesting;<\/p>\n<p>using System.Collections.Generic;<\/p>\n<p>using System.Linq;<\/p>\n<p>namespace ApiDemo<\/p>\n<p>{<\/p>\n<p>public class PluginExample2 : ILoadTestPlugin<\/p>\n<p>{<\/p>\n<p>LoadTest m_loadTest;<\/p>\n<p>int count = 0;<\/p>\n<p>public void Initialize(LoadTest loadTest)<\/p>\n<p>{<\/p>\n<p>m_loadTest = loadTest;<\/p>\n<p>m_loadTest.TestSelected += new System.EventHandler<TestSelectedEventArgs>(m_loadTest_TestSelected);<\/p>\n<p>m_loadTest.Heartbeat += new System.EventHandler<HeartbeatEventArgs>(m_loadTest_Heartbeat);<\/p>\n<p>}<\/p>\n<p>void m_loadTest_Heartbeat(object sender, HeartbeatEventArgs e)<\/p>\n<p>{<\/p>\n<p>if(e.IsWarmupComplete)<\/p>\n<p>{<\/p>\n<p>count++;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>void m_loadTest_TestSelected(object sender, TestSelectedEventArgs e)<\/p>\n<p>{<\/p>\n<p>if (count > 120 &amp;&amp; e.TestName.Equals(&#8220;WebTest1&#8221;))<\/p>\n<p>{<\/p>\n<p>e.TestName = &#8220;WebTest2&#8221;;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<h4>Change the User Load<\/h4>\n<p>This sample will show you how you can change the user load of a running load test. You can create your own custom load profiles with this extensibility point. In this example we will create a plugin which reads the load from a text file and then changes the load of the running test to that value.<\/p>\n<p>The file name that stores the user load can be set from a load test context parameter.\u00a0 Then we will read that file at every heartbeat event, and change the load to that value. Another good demo of this would be to create a simple winforms app that writes the new user load to a file or registry location. Then have the plugin read from that location. Then you could turn a knob or enter the user load that way. With the way this sample is written, you would simply add a number to the text file and save it. You can change the value while the test is running.<\/p>\n<p>using System;<\/p>\n<p>using System.IO;<\/p>\n<p>using Microsoft.VisualStudio.TestTools.LoadTesting;<\/p>\n<p>namespace ApiDemo<\/p>\n<p>{<\/p>\n<p>public class PluginSample3 : ILoadTestPlugin<\/p>\n<p>{<\/p>\n<p>LoadTest m_loadTest;<\/p>\n<p>string m_fileName;<\/p>\n<p>public void Initialize(LoadTest loadTest)<\/p>\n<p>{<\/p>\n<p>m_loadTest = loadTest;<\/p>\n<p>m_loadTest.Heartbeat += new System.EventHandler<HeartbeatEventArgs>(m_loadTest_Heartbeat);<\/p>\n<p>\/\/initialize the file name<\/p>\n<p>if (m_loadTest.Context.ContainsKey(&#8220;FileName&#8221;))<\/p>\n<p>{<\/p>\n<p>m_fileName = m_loadTest.Context[&#8220;FileName&#8221;].ToString();<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>m_fileName = @&#8221;c:Userload.txt&#8221;;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>void m_loadTest_Heartbeat(object sender, HeartbeatEventArgs e)<\/p>\n<p>{<\/p>\n<p>int load = GetUserLoadFromFile();<\/p>\n<p>if (load != -1)<\/p>\n<p>{<\/p>\n<p>m_loadTest.Scenarios[0].CurrentLoad = load;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>private int GetUserLoadFromFile()<\/p>\n<p>{<\/p>\n<p>int newLoad = -1;<\/p>\n<p>try<\/p>\n<p>{<\/p>\n<p>using (StreamReader streamReader = new StreamReader(m_fileName))<\/p>\n<p>{<\/p>\n<p>string load = streamReader.ReadToEnd();<\/p>\n<p>try<\/p>\n<p>{<\/p>\n<p>if (!string.IsNullOrEmpty(load))<\/p>\n<p>{<\/p>\n<p>newLoad = int.Parse(load);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>catch (FormatException)<\/p>\n<p>{<\/p>\n<p>\/\/ignore<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>catch (IOException)<\/p>\n<p>{<\/p>\n<p>\/\/ignore<\/p>\n<p>}<\/p>\n<p>return newLoad;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>Here is a picture of my userload. I start at 25, up to 52, down to 7 and back to 25.<\/p>\n<p><img decoding=\"async\" border=\"0\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2015\/12\/UserLoad.jpg\" \/><\/p>\n<h4>Adding values to Test Context<\/h4>\n<p>This sample will show you how you can modify the test context that is being passed to a test. You do this from the test starting event. Maybe there is a value you are reading in from a database or some other value that you want to pass into each test. Another problem is that load test context parameters are not copied to test context of unit tests. This plug-in would copy those values:<\/p>\n<p>using System;<\/p>\n<p>using System.Collections.Generic;<\/p>\n<p>using System.Text;<\/p>\n<p>using Microsoft.VisualStudio.TestTools.LoadTesting;<\/p>\n<p>namespace Blog<\/p>\n<p>{<\/p>\n<p>public class CopyParamtersPlugin : ILoadTestPlugin<\/p>\n<p>{<\/p>\n<p>\/\/store the load test object.<\/p>\n<p>LoadTest mLoadTest;<\/p>\n<p>public void Initialize(LoadTest loadTest)<\/p>\n<p>{<\/p>\n<p>mLoadTest = loadTest;<\/p>\n<p>\/\/connect to the TestStarting event.<\/p>\n<p>mLoadTest.TestStarting += new EventHandler<TestStartingEventArgs>(mLoadTest_TestStarting);<\/p>\n<p>}<\/p>\n<p>void mLoadTest_TestStarting(object sender, TestStartingEventArgs e)<\/p>\n<p>{<\/p>\n<p>\/\/When the test starts, copy the load test context parameters to<\/p>\n<p>\/\/the test context parameters<\/p>\n<p>foreach (string key in mLoadTest.Context.Keys)<\/p>\n<p>{<\/p>\n<p>e.TestContextProperties.Add(key, mLoadTest.Context[key]);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I have had two questions that involved the need to create a load test plugin.\u00a0\u00a0 In the latest scenario the person wanted Cloud-based load test to ramp up the user count randomly. Yes plugins work the same for both on-premises and Cloud-based load testing.\u00a0 In this post i will walk through creating a [&hellip;]<\/p>\n","protected":false},"author":63,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,252],"tags":[],"class_list":["post-10662","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-testing"],"acf":[],"blog_post_summary":"<p>This week I have had two questions that involved the need to create a load test plugin.\u00a0\u00a0 In the latest scenario the person wanted Cloud-based load test to ramp up the user count randomly. Yes plugins work the same for both on-premises and Cloud-based load testing.\u00a0 In this post i will walk through creating a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/10662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=10662"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/10662\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=10662"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=10662"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=10662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}