locked
How to assign records of one page to VUs on run time during the load test ? RRS feed

  • Question

  • In one  html page there are  10  "Create Record" button.

    The web test scripts  identifies each "Create Record" button by unique set of query string parameters and form post parameters.

    I want to parse the html of the page on run time and assign one  "Create Record" button to one Virtual User ?

    I can parse the html using HtmlAgility pack assembly , but I am  wondering how to assign one "Create Record" button to one virtual user ?

     Is it possible ?


    Abhisek Biswal

    Tuesday, August 15, 2017 6:10 PM

All replies

  • Hi AbhisekB,

    Welcome to MSDN forum.

    >>but I am wondering how to assign one "Create Record" button to one virtual user?

    We could not assign one “Create Record” button to one virtual user during run time. Btw,why do you need to do this?

    We could simulate user load is adjusted during a load test. Following document describe the details of editing load patterns to model virtual user activities:

    https://msdn.microsoft.com/en-us/library/dd997551.aspx

    Thanks for your understanding.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Wednesday, August 16, 2017 9:10 AM
    Wednesday, August 16, 2017 9:10 AM
  • Hi ,

    The reason why I want to assign one create record button to one Vistual User  is mentioned below :

    There are 10 create record buttons getting displayed in one page.

    Once an user clicks on one create record button to create a record , the said Create Record button turns to a Cancel Record button.So it means that One create record button can  be used only once, that means one Create record button can be assigned to one virtual user only.


    During Load Test if  multiple VUs will try to access the same Create Record button then test will fail because one Create record button can be used only once. That is why I want to assign one create record button to one VU.

    Here I would like to mention that each Create Record button can be  distinguished from the other by an unique set of query string parameters associated with it. 

    So  is there any way to assign one unique set of query string parameters(which represent one Create Record button) to a unique Virtual User?

    How do I achieve the same ? 


    Abhisek Biswal


    • Edited by AbhisekB Thursday, August 17, 2017 1:32 PM
    Thursday, August 17, 2017 1:28 PM
  • Hi Abhisek,

    Thanks for your reply.

    Based on your description, you using coded UI tests in load test, right?

    We could only specify only one v-users to run coded UI test when using coded UI tests in load test. 

    Reference: https://msdn.microsoft.com/library/ff468125(VS.110).aspx#Coded

    Thanks for your understanding.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Friday, August 18, 2017 2:24 AM
    Friday, August 18, 2017 2:23 AM
  • Hi ,

    I am not using Coded UI test for Load Test .

    I am using Visual Studio  "Web Performance and Load Test Project" tool.

    Refer the below sample web test scripts , which is a part of load test.

    I want to ensure  one record is assigned to one virtual user only.

    I can parameterize  the web test scripts with a set of a query string parameters which distinguishes each Create Record button. 

    But how do I ensure that unique record can be assigned to unique virtual user ?




    Abhisek Biswal

    Friday, August 18, 2017 6:50 AM
  • Hi Abhisek,

    Sorry for my misunderstanding.

    >> But how do I ensure that unique record can be assigned to unique virtual user?

    Unfortunately, we cannot ensure that unique record can be assigned to unique virtual user.

    The virtual user in load test is simulate a certain number of users accessing the system concurrently, we can’t load virtual users for every page or button. 

    For more information on how to load virtual users in a load test, please refer to this document:

    https://msdn.microsoft.com/en-us/library/dd997551(v=vs.110).aspx 

    Thanks for your understanding.

     

    Best regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    • Edited by Fletch Zhou Friday, August 18, 2017 8:04 AM
    Friday, August 18, 2017 8:04 AM
  • You might try the following. Run the test with 10 virtual users. Each user runs the same test code. Have that code (ie from the html agility pack) parse the html and get a list (or array or similar) of 10 buttons, where each button is either create or cancel. Use the context parameter "$WebTestUserId" to index the list and perform the actions for that button.

    Regards

    Adrian

    Sunday, August 27, 2017 9:56 AM
  • Hi

    Here is an idea.

    In the Load test create multiple scenarios.

    1. As you only have 10 "Create Record" buttons you will create 10 scenarios
    2. Each scenario will target a unique URL/query string parameters/form posts
    3. Each scenario represents a Virtual User.
    4. Each scenario is configured to have a constant load pattern
    5. Each scenario with have a user count of 1
    6. Each scenario will have a test Mix set to "Test mix based on sequential order"
    7. Test execution time can start at 30 seconds and you can adjust from there

    Please let me know if that works!

    Thursday, August 31, 2017 1:37 AM