Load test for pre defined Number of Iterations
Is it possible to configure a load test to perform a particular number of iterations? ACT used to have this functionality but I can't seem to see it in the load test configuration wizard.
Is it possible to configure a load test to perform a particular number of iterations? ACT used to have this functionality but I can't seem to see it in the load test configuration wizard.
This way it'll work, unless one of the test fails inside your first Ordered Test.
For example:
First Create yourself an Ordered Test called OrderedTest1 then place the tests you want to execute inside that Ordered Test.
Secondly, create yourself a second Ordered Test (OrderedTest2) or copy/paste the first one but never tried this before so I can't guarantee you anything...
Then place these two(or more if you want) Ordered Test into one *BIG* Ordered Test called MainOrderedTestThen run that MainOrderedTest
See if that works!
Again, this is a workaround but eventually, they might come out with a tool that allows this...The only other problem with this approach is that you have to know in advance how many Ordered Tests you'll want to place in that *BIG* Ordered Test.
Hope this helps!
Sincerely
Vince
Anyone any idea why this functionality is missing? Is it just an oversight on MS's part?
There's nothing worse than 'upgrading' in this case from ACT to find functionality missing !!
1) If you are only interested in running a webtest for a certain number of iterations, you can run the web test through playback. In the web test editor, select the run button option for Run Test (Pause Before Starting). Then in the playback UI, click on the run settings button on the toolbar. Set the number of run iterations to what ever you want and run the test. If you do it this way, you do not get perf counters collected.
2) Bind your web test to a data source and set the data source access method to unique. By setting the access method to unique, one iteration of the web test will be executed for each row in the datasource. So if you have 16 rows, the test will execute 16 times and then the load test will stop. You can change the access method of a data source by selecting the table under a data source node in the web test editor, opening the property window and changing the access method to unique.
3) You can write a load test plugin which stops the web test after a certain number of iterations. Look at the following post, http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=118191 The difference is in your plugin, you would want to listen for the TestFinished event, and then stop the load test when you reach the number of finished tests you want. You could set a context parameter in your load test which has the number of iterations you are interested in and read this value in your plugin. To set a context paramater in the load test, click on the run setting node and choose Add Context Parameter. Then set the name and value to whatever you want. These values are available in the plugin.
Databinding a list of users to the username field in a web test. In Load runner I would normally assign a block of data for each virtual user and have the user name the same for that size block ie the datatable would look like user1, component 1 Then if set each user to run 3 iterations during the load test.
user1, component 2
user1, component 3
user2, component 4
user2, component 5
user2, component 6
I have a coded web test which uses a sql database with 4,000 rows, however when I run the test as a load test it only ran for 754 iterations and then completed after an hour and half. The data binding was set to unique and the test time as set to 4 hours. I was expecting it to run for 4,000 iterations. The test uses five values from the database for parts of the url, its almost as if each one items counts as using a row in the database, could this be the case or do you have any other ideas as to why it completes early?
1) Were there any errors on the error tab of the load test execution UI. If the tests stops early because it hit the number of rows in the datasource, then then we log a message to the error tab.
2) Open the result in the Test Results window. Then on the toolbar for this window click the button for run details. This is to the left of the dropdown list. Are there any messages for the run.
If you have closed out VS, you can load the result back into the window by finding the .trx file associated with the run. These files are stored in a folder called TestResults which is under the solution folder. On the test results window, click the import test results button, find the correct trx and hit OK. This will load the result and then you should be able to find the answers to the above questions.
Hi, thanks for the reply, I looked more closely at the errors we were getting and removed a lot of the counter sets to reduce these. This then ran as expected.
While not a load test solution, I thought one could use the "Number of run iterations" setting under the "Web Test" portion of the .testrunconfig files to manage the number of times a test runs. I thought this was the intended mechanism for setting iteration counts.
However, I've noticed a problem that arises when I use these webtests as elements of orderedtests that I'm not sure I understand.
I thought that if I ran an ordered test, using a testrunconfig file set to N itereations, that the elements of the ordered test would each run N times. For example, if the ordered test called 3 webtests (wt1, wt2, wt3), then I thought the test results would show run1 for wt1, wt2, & wt3... then run2 for wt1, wt2 & wt3... through the Nth run for wt1, wt2, & wt3.
However, instead I see N runs for wt1 and 1 run each for wt2 & wt3. I don't understand why and hope I am just missing something.
In addition, it appears that the N runs of wt1 complete, first, prior to any of the single instance runs of wt2 & wt3. However, what I wanted was for the orderedtest to run, in its entirety, N times.
Any suggestions for how I might better accomplish that?