Continuous Integration Practice (I) functional testing before submission is too slow

Source: Internet
Author: User
Tags selenium grid

I received a letter about continuous integration more than a month ago. The content is as follows:

"In our current project, we ran a complete test using selenium grid and ran the test using ten servers in a distributed manner. It took more than one hour to run the test, and it was impossible to run the test locally. In this case, it is no longer possible for developers to submit all the test jobs locally. Have you ever encountered a similar situation? How is it solved ?"

Many people may have practiced agile or lean methods in their teams. Although some teams may feel some results, they may not be the majority satisfied. Aside from soft factors such as corporate culture, the technical understanding of a certain practice may also be greatly affected.

 

Our goal is to deliver software value quickly and with high quality. If "local test time" has become a bottleneck in the production process (that is, a waste of time), it should be solved.

 

Theoretically, "Run all tests locally and then submit again" has no problem at all, especially in the initial stage of the project. However, the code library will grow up in a day. For long-cycle projects, we need to reconsider the ideas behind this theoretical practice.

 

Selenium testing is a function test that consumes a lot of machine resources. Therefore, you can ask yourself some questions to find the answer.

 

1. Is there a unit test?

(1) If so, has the unit test coverage reached a reasonable range?

(A) If yes, these functions can be tested in a continuous integration environment.

(B) If not, strengthen unit tests until reasonable coverage is reached.

(2) If not, you can select an important function test set to run locally and add a unit test.

 

 

Unit Tests are indispensable code in the thoughtworks team. Without a unit test, you may not know how to write code.

 

 

2. Why is Function Testing slow? Can I optimize it? Can 20 machines be added if the optimization takes too long?

 

Machine costs are much less than human costs. An 8-core/16 GB blade server is more than 10 thousand RMB, that is, 8 machines. Apply to the functional tests mentioned above to increase the testing speed by at least 30%. What a considerable number.

 

As long as you understand your thoughts and make sure that your implementations remain unchanged, continuous integration is not a problem.

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.