locked
Hi RRS feed

  • Question

  • Am facing few problems while conducting Load Test in VSTS 2012 Ultimate.

    1. First problem was "Data Access Methods".(Sequential,Random,Unique)

    If am selecting sequential data access method to read data from a CSV file in a load test, all the agents were started with same User(copy CSV file was sharing by all the agents and all agents were started with Same row.)

    If am selecting Unique data access method to read data from a CSV file, Each user was able to run only one iteration over the duration.(No more rows of data in a data source table with Access method Unique)

    Let say I want to run load test with 100 users for 1hr duration. For one Iteration of all users will take 10 mins. So all the users can execute 10 iterations with in 1hr. That was not happening. All the users were able to run only one iteration if I am selecting Data Access Method as Unique.

    2. Second Problem there were no Login() and Logout sections. Every time user has to login and logout from the application.

    I have seen lot of people were posted about the same problem. Please can anyone help on this.



    GVReddy

    Wednesday, February 4, 2015 1:13 PM

Answers

  • For distributing the login users across the agents I think you have to spread the users yourself and specify SEQUENTIAL access. There are several methods that might work.

    In the data source have ten columns of user-ids, one column for each agent. Use the context parameter "$AgentId" to pick the column.

    Have ten versions of each user-id, where the versions are distinguished by having agent-id numbers. Eg "alice1", "alice2", ..., "alice10", "brian1", "brian2", ..., "brian10", etc. Just have "alice", "brian", etc in the data source but append the context parameter "$AgentId" to each name before use.

    If the application allows one user to be logged in on multiple computers then you could have specify RANDOM access. If there are enough user-ids in the data source then there should not be many clashes where a user is logged for more than one test. For a test with 100 virtual users the data source should normally have many more than 100 different user-ids, otherwise Visual Studio has no option other than using the same user-id for more than one virtual user at the same time.

    Regards

    Adrian

    • Marked as answer by Vigneshwara Tuesday, February 10, 2015 5:09 AM
    Thursday, February 5, 2015 12:01 PM

All replies

  • Hi GVReddy,

    Based on the first problem, I suggest you can refer the Tejas's suggestion to understand this Data Access Methods as Unique for load test, maybe you will get more message.

    https://social.msdn.microsoft.com/Forums/en-US/3eee965f-0daa-46f2-ab7c-8a44a9db5fe5/web-performance-tests-unique-and-sequential-data-acess-methods?forum=vstswebtest

    >>2. Second Problem there were no Login() and Logout sections. Every time user has to login and logout from the application.

    In addition, since one thread for one issue, as you said the second issue. If possible, please post a new case for the new issue in our forum. You could share the detailed information about the new issue in your new case such as please provide me a screen shot about where you see the user has to login and logout from the application every time.

    Thanks for your understanding.

    Best Regards,

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, February 5, 2015 8:55 AM
  • Hi Tina-Shi,

    Thanks for your reply.

    I have seen the Post which was posted by TejasJ. He explained how the data access methods will work.

    But I think if am selecting sequential method to access the data from a data source all the agents will share the CSV file and starts from the first row of data source. Let say 5 users from different (5) agent machines, 10 data rows, 10 iterations for a scenario. I think all the 5 Users will select 1st row of the data source for the 1st iteration. Please correct me if am wrong about this.

    Actually I have to execute my load test with 100 Users with 1hr duration, and I have 10 Agent machines. So here I have to take care of selecting a access method. 

    If am selecting Unique method to access the CSV (Users data of 100 rows) file, Load test was executed only one time for a User and It was stopped before 1 hr duration.

    If am selecting Sequential method to access the CSV (Users data of 100 rows) file, All the Load test users starts with the 1st row of the CSV (Users data of 100 rows) file. Means 100 users logged in to the application with same credentials.

    In my application single signon functionality was there. So all the users started getting failed except first user.

    And, So finally I Understand from the replies,it is not possible for reusing the CSV file if am selecting Unique access method in the load test. Am I correct?

    2. Second Problem there were no Login() and Logout sections. Every time user has to login and logout from the application.

    I have a scenario, where User will login to my application and he will upload One file then he has to logout from the application.

    Here for my load test User has to login only once and has to upload 5 files (one by one) then user has to logout once only. Means User has to perform login and logout actions only one time. And he has to run upload transaction for 5 times. How to do this?

    Please let me know if anymore information you need.

    Thanks,


    GVReddy

    Thursday, February 5, 2015 11:13 AM
  • For the second problem I can think of two possibilities.

    (1) Perform the file upload within a loop in the web test. If you need to data drive different values within the loop look for the "Advance data cursors" property of the loop.

    (2) Put the file upload test in a scenario and in the "Edit test mix" window specify the login and logout tests in the section for "Initialize and terminate tests".

    Regards

    Adrian

    • Proposed as answer by Ahetejaz Tuesday, February 10, 2015 3:25 PM
    Thursday, February 5, 2015 11:44 AM
  • For distributing the login users across the agents I think you have to spread the users yourself and specify SEQUENTIAL access. There are several methods that might work.

    In the data source have ten columns of user-ids, one column for each agent. Use the context parameter "$AgentId" to pick the column.

    Have ten versions of each user-id, where the versions are distinguished by having agent-id numbers. Eg "alice1", "alice2", ..., "alice10", "brian1", "brian2", ..., "brian10", etc. Just have "alice", "brian", etc in the data source but append the context parameter "$AgentId" to each name before use.

    If the application allows one user to be logged in on multiple computers then you could have specify RANDOM access. If there are enough user-ids in the data source then there should not be many clashes where a user is logged for more than one test. For a test with 100 virtual users the data source should normally have many more than 100 different user-ids, otherwise Visual Studio has no option other than using the same user-id for more than one virtual user at the same time.

    Regards

    Adrian

    • Marked as answer by Vigneshwara Tuesday, February 10, 2015 5:09 AM
    Thursday, February 5, 2015 12:01 PM
  • Thanks for reply.

    GVReddy

    Tuesday, February 10, 2015 5:09 AM
  • Hi,

    First - It does not matter whether you use sequential, random or unique data access method. None of your data will repeat. So you can use any type depending how you created your data base. 

    Second - You could login once, perform file upload parameter five times and then you could logout.

    Now how to do that, If use see the available option on the file upload request you can see VSTS provide a looping operation. So you can loop over it five times. If not you can simply copy the request five times one after the other but make sure to make it unique. 

    Then vsts will login and then it will execute your five request to upload the file and then it will logout. 

    You can even go for random cause that will also make sure that other users active at the same time and the five request in the sequence wont use the already used data.

    Coming to our point that all user will select the csv files first data... I think it does not work like that. If you check your error properly I believe you may find some other reason for the script to fail because though we assume 100 users will create data simultaneously  there will b some delay in the execution and when it reads the access type as sequential then for each new user it will select the next available record for the test. I suggest you try out with random it may help you to solve your problem. I was able to achieve a similar scenario using sequential access type.

    Thanks.

    • Proposed as answer by Ahetejaz Tuesday, February 10, 2015 4:18 PM
    Tuesday, February 10, 2015 3:20 PM