The layering of automated tests!

Source: Internet
Author: User

Unit testing: This layer is primarily for product development students, such as unit test cases that use the JUnit development approach, which are usually static and test data generated through various mock techniques.

Interface test: This layer is mainly by the test students, such as we need to the HTTP, HSF, Top/mtop and other interfaces for business functional testing, verify compliance with the interface definition and business requirements, because it is based on business testing, so the test data are true, We need to call the interfaces provided by other business parties to generate the data for testing.

UI testing: This layer is primarily the responsibility of the test students, using a variety of UI Automation tools for the development of test scripts, we can use tools such as Automanx or selenium to implement automated testing of the UI layer.

Why do you want to draw a pyramid, not a rectangle or an inverted triangle? This is to indicate the proportion of automated tests that have been put into operation at different stages. If a product has never done unit testing and interface testing, it is unscientific to do only the UI layer of automated testing, which makes it difficult to guarantee the quality of the product in essence. If you attempt to achieve a comprehensive UI layer of automated testing, it is a costly move, put a lot of manpower time, the final gains may be much lower than the cost of the payment. Because the higher the upper, the higher the maintenance cost. The elements of the UI layer, in particular, are often changed. Therefore, we should put more automated tests in the unit testing and interface testing phase.

Now that the UI layer's automated tests are so costly, we only do unit tests and interface tests. No! Because no matter what kind of product, ultimately presented to the user is the UI layer. Therefore, testers should be more focused on the UI layer. So it is because testers put a lot of effort into the UI layer, so it is necessary to help us in an automated way to "partially liberate" repetitive labor.

As for the scale of the three Tests in the pyramid, they are divided according to the actual project requirements. In the "Google test" book, for Google products, 70% of the investment is unit testing, 20% for integration, interface testing, 10% for the UI layer of automated testing.

The layering of automated tests!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.