1

I have a Web Performance test created in VSTS Ultimate 2013 with Record feature of the tool. This test involves the below mentioned scenario:-

  1. Login to application
  2. Navigate to the Search Page
  3. Open Create New Page
  4. Enter Data and Save record (at this point an entry is created in Database too)

I have added Validation Rule (Finding Username, which is displayed on page header once record save operation is completes) in this test, just to make sure that record is saved and web test is working fine, all the test data (like Name, Address etc.) is coming from CSV file. Now, when I run this test it executes well and assertion (Find Username) works fine. Entry is there in Database too.

Now, I have created a load test in VSTS Ultimate which is using this web test and specified the user load as 5 with constant load pattern and Iteration count as 1, this test case still creates only 1 entry in Database while I have 5 rows with different dataset in CSV file. But if I increase the number of Iterations from 1 to 5, then it creates 5 records; which is a bit confusing. Why VSTS Ultimate is not creating 5 records with constant load as 5, why it is creating only 1 record for 5 user load.

First I thought that application might not be able to handle 2 concurrent user load but if that had been the case then I should get Assertion Failed error or some other error which is not there.

What could be the possible reason for this behavior of load pattern? Do I need to change anything or I'm missing something in my tests?

1 Answer 1

1

As the iteration count is 1 only one test case is executed.

Both the scenario and the run settings provide an iteration count. Both relate to number of test cases executed. See this Microsoft blog for some more information.

Set the iteration count in the scenario to 0 (ie zero) to let the values in the run settings control the number of tests executed. Then in the run settings select between a test that runs for a period of time (with Use test iterations == False) or a test that executes a number of test cases (with Use test iterations == True).

For example. To have each of the 5 virtual users run (on average) 3 tests, set the iteration count in the run settings to 15 and the iteration count in the scenario to either 0 or 15. Alternatively set the iteration count in the scenario to 15 and in the run settings specify a test duration long enough to run 3 tests one after another.


The original question had several references to Coded UI, hence the answer below.

Only one Coded UI test can be run at a time on one computer. Coded UI takes over the mouse, keyboard and screen of the computer while the test executes. To run a test with 10 users doing Coded UI tests at the same time will need 10 agent computers (they can be real or virtual, or a mix).

See, for example this Microsoft blog for more details.

7
  • I think you mis understood my question I am not executing UI test, I am creating performance test and using it in load test. When one execute web performance test with extension .webtest or load test with extension .loadtest then Coded UI doesn't take over the mouse, keyboard etc.
    – Dhiman
    Apr 12, 2016 at 10:27
  • @Dhiman Your question states that you have a Coded UI test and are running it as part of a load test. If your test was not created using Coded UI then please explain why you mention Coded UI in the question title, in the tags, and more than once in the question's body.
    – AdrianHHH
    Apr 12, 2016 at 10:57
  • I got your point and the root cause of confusion. I updated the question accordingly.
    – Dhiman
    Apr 12, 2016 at 13:14
  • Please correct me if I am wrong. Iteration = number of times whole load test needs to be executed and Users = number of Virtual Users/Threads VSTS needs to start to put load on server. If I have 1 test case in my load test (which is the current case, as I have only 1 performance test inside load test) and set the number of users to 5 with Iterations = 2, then as per my understanding VSTS should execute whole test 2 times with 5 virtual user load in each iteration. Which is not happening. I will go through mentioned link in your post but want to confirm if my understanding mentioned is correct?
    – Dhiman
    Apr 12, 2016 at 14:07
  • @Dhiman No, definitely not. For Visual Studio load tests one iteration means the running of one test case. Please read the detailed Microsoft documents, I cited them for good reasons.
    – AdrianHHH
    Apr 12, 2016 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.