简体   繁体   中英

VS2010 Coded UI Tests vs. Web Performance test (Whats the difference??)

Been playing with both for a couple hours.

You use a Coded UI test to record some actions and verify them through assertions..

You use a Web Performance test to record some actions and verify them through validation tests/extraction tests... basically same thing... then you can convert to code optionally like the Coded UI Tests

But it seem you can only add a WEB PERFORMACE TEST to a loadTest...

But arent they both pretty much the same thing?? What am I not understand?? Why not allow a Coded UI Test to be inside a load test?

Coded UI tests are for automated functional testing. These tests will simulate user interaction against the UI, such as button clicks and entering text. Coded UI tests require an interactive desktop environment, because they actually interact with the windows and objects of your application. Coded UI Tests in VS2010 are the equivalent of using something like HP QuickTest Pro or Selenium to drive your automated functional regression tests.

Load tests record and drive your application at the HTTP level. These tests simulate headless user interaction against your app server by sending HTTP requests directly, without a UI. Load tests typically assume that your application works correctly for 1 user, but aim to see if it functions under a heavy user load. Load tests are headless because simulating thousands of users with an interactive UI is not practical. By being headless, a single load agent machine can simulate hundreds or thousands of users. VS load tests are the equivalent of using HP LoadRunner or JMeter to drive virtual user load.

Functional and performance testing are two distinct types, with different strategies and processes. On a given project, you might have hundreds of automated functional tests (coded ui, for example), but only dozens of automated performance tests. You have so many more functional tests because you are testing your app in many different scenarios relative to your business requirements. Whereas with performance tests, you take your top dozen most commonly used transactions and run them under load.

i think this article has a great value on this discussion

CodedUI Tests – Coded UI tests are for automated functional testing. These tests will simulate user interaction against the UI, such as button clicks and entering text. Coded UI tests require an interactive desktop environment, because they actually interact with the windows and objects of your application. Coded UI Tests in VS2010 are the equivalent of using something like HP QuickTest Pro or Selenium to drive your automated functional regression tests.

Web Performance Tests - Web testing has much more than GUI testing. Web Performance Tests are used for testing the functionality and performance of the web page, web application, web site, web services, and combination of all of these. Web Performance Tests can be created by recording the HTTP requests and events during user interaction with the web application. The recording also captures the web page redirects, validations, view state information, authentication, and all the other activities. It can be classified in two ways which includes Simple Web Performance Tests and Coded Web Performance Tests.

Simple Web Performance Tests generate and execute the test as per the recording with a series of valid flows of events. Once the test is started there won't be any intervention and it is not conditional.

Coded Web Performance Tests are more complex but provide a lot of flexibility. These types of tests are used for conditional execution based on values. Coded web tests can be created manually or generated from the Web Performance Test recording.

Load Tests- Load tests record and drive your application at the HTTP level. These tests simulate headless user interaction against your app server by sending HTTP requests directly, without a UI. Load tests typically assume that your application works correctly for 1 user, but aim to see if it functions under a heavy user load. Load tests are headless because simulating thousands of users with an interactive UI is not practical. By being headless, a single load agent machine can simulate hundreds or thousands of users. VS load tests are the equivalent of using HP LoadRunner or JMeter to drive virtual user load.

Conclusion Functional and performance testing are two distinct types, with different strategies and processes. On a given project, you might have hundreds of automated functional tests (coded ui, for example), but only dozens of automated performance tests. You have so many more functional tests because you are testing your app in many different scenarios relative to your business requirements. Whereas with performance tests, you take your top dozen most commonly used transactions and run them under load.

Good news, from VS2012 you can add coded ui test into Load Test.

http://msdn.microsoft.com/en-us/library/ff468125.aspx

Coded UI tests are new to 2010. They validate against the actual UI (placement in the DOM, visibility etc.) of the application where the other does not. The Web Performance Test validates against the HTTP/HTTPS connection against the server.

This talks about functional UI testing and shows the use of the Coded UI test.

http://channel9.msdn.com/shows/10-4/10-4-Episode-18-Functional-UI-Testing/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM