none
Database parameters and nested web performance tests

    Question

  • Hi Folks,

      I have a web performance test that contains the following sub-tests (performed in the order given):-

    1.      Login
    2.      Find User
    3.      Create User
    4.      Logout

     The username for each sequence of needs to be read from the database.  I have added a data source to the database table concerned (which contains 200 test users).  I have set the database access method to Unique for the moment and for each included sub-test I have set the 'Inherit Web Test Settings' property to true.

    My question is, how do I pass the username (and other database fields) down to the nested tests. Do I need to add a data source to each sub-test separately and bind - in which case how does the database cursor work on the parent and the children (do the children use the same record as the parent?)

    Eventually I want to include this web performance test in a load test to simulate 200 concurrent users, so any other tips would be appreciated.

    Regards

    Andy

    Monday, March 20, 2017 9:23 PM

Answers

  • On the parent test I added a data source to the table, and for each sub-test I did the same and also bound the query parameters to the appropriate table column.

    In the Local.testsettings under the Web Settings, I changed the setting to 'One run per data row. 

    It appears that the column names for the database connection are global variables which get updated each iteration.

    • Marked as answer by AndyW2007 Tuesday, March 21, 2017 12:59 AM
    Tuesday, March 21, 2017 12:58 AM

All replies

  • On the parent test I added a data source to the table, and for each sub-test I did the same and also bound the query parameters to the appropriate table column.

    In the Local.testsettings under the Web Settings, I changed the setting to 'One run per data row. 

    It appears that the column names for the database connection are global variables which get updated each iteration.

    • Marked as answer by AndyW2007 Tuesday, March 21, 2017 12:59 AM
    Tuesday, March 21, 2017 12:58 AM
  • Hi Any,

    Thank you for sharing the answer.

    Best regards,

    Fletch


    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.

    Tuesday, March 21, 2017 2:39 AM

  • In the Local.testsettings under the Web Settings, I changed the setting to 'One run per data row. 

    That setting only applies when you are running the webtest directly it will be overridden when running as part of a load test.  Other than that spot on.

    Cheers

    Tuesday, March 21, 2017 9:52 AM