locked
Execute requests from webtestplugin RRS feed

  • Question

  • Hi

    I am using VS 2012 Ultimate to create performance tests. Now that I have added some webtests to my load test I realized that I wanted to set my webtest logins as PreWebTests and logouts as PostWebTests. Is it possible to make webtest requests from a webtestplugin or is there another way of doing this that is better?

    BR Stefan


    Wednesday, April 15, 2015 2:37 PM

Answers

  • In the test mix you can specify web tests to run when a virtual user starts and when they end. So you could specify your login and logout there. Additionally if you set the percentage of new users (in the scenario properties) to 100 then each virtual user will only run one of the other tests.

    From within a plugin you can modify the requests in a test. Adding and removing dependant requests is easy. possibly you could achieve what you want this way. However, I believe that Jack's recommendation of recording the logins and logouts as part of the test is the best approach.

    You may be able to avoid recording logins and logouts for every test. Visual Studio supports cut, copy and paste of requests in web tests. Hence you could copy the login and logout from one webtest into another. (The context menu does not always include the cut, copy and paste commands, so try using Control-X, Control-C and Control-V.) Visual Studio also supports dragging requests in a webtest making reordering requests easy.

    Regards

    Adrian

    Friday, April 17, 2015 8:13 AM
  • Hi BR Stefan,

    My understanding is that if you want to create the web performance test for the log in/out pages, just record the real requests, and then check that whether your requests could capture the users or others information.

    But if you just want to test the log in/out control actions, I suggest you use the Coded UI test.

    About how to create the coded UI test:

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

    Best Regards,

    Jack 


    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.

    Friday, April 17, 2015 3:06 AM

All replies

  • Hi BR Stefan,

    My understanding is that if you want to create the web performance test for the log in/out pages, just record the real requests, and then check that whether your requests could capture the users or others information.

    But if you just want to test the log in/out control actions, I suggest you use the Coded UI test.

    About how to create the coded UI test:

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

    Best Regards,

    Jack 


    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.

    Friday, April 17, 2015 3:06 AM
  • In the test mix you can specify web tests to run when a virtual user starts and when they end. So you could specify your login and logout there. Additionally if you set the percentage of new users (in the scenario properties) to 100 then each virtual user will only run one of the other tests.

    From within a plugin you can modify the requests in a test. Adding and removing dependant requests is easy. possibly you could achieve what you want this way. However, I believe that Jack's recommendation of recording the logins and logouts as part of the test is the best approach.

    You may be able to avoid recording logins and logouts for every test. Visual Studio supports cut, copy and paste of requests in web tests. Hence you could copy the login and logout from one webtest into another. (The context menu does not always include the cut, copy and paste commands, so try using Control-X, Control-C and Control-V.) Visual Studio also supports dragging requests in a webtest making reordering requests easy.

    Regards

    Adrian

    Friday, April 17, 2015 8:13 AM