Let's explain "what should we automate continuous integration ?"

Source: Internet
Author: User
Continuous integration is one of the best agile practices, but not only teams that use agile methods can adopt it. But if you can adopt agile methods, it will play a greater role.

What is continuous integration beforeArticleI have already talked about it. Here I will only elaborate on part of it: six basic automation of continuous integration. These six basic automation methods are: Automatic Testing, automatic production of deployable binary files, and deployment of them in a production-like environment to automatically identify yourCodeBaseline: automatically runs regression tests and generates measurements.

I,Run the test
This is unnecessary, but there are still many projects. The continuous integration process only compiles the code and does not do anything else. Which of the following colors can be green during continuous integration?Work-readySoftware-without automated testing, where do you have confidence? A set of good tests should cover all the code as much as possible, and the running should be as fast as possible (that is, your most important build should be no more than 10 minutes ), do not rely on other basic environments (such as databases or message channels ).
 
II,Generate deployable binary code
It can be a jar package that can be deployed on the Web application server, or an MSI Installation File. No matter which method you use to install your software, the continuous integration process always needs to package and finally generate this thing. In this way, the tester can directly download the installation package from the page of the continuous integration tool to test, which reduces the feedback time between checking the code and knowing the code can work. The deployable binary code generated by continuous building also means that it is continuously tested to avoid the trouble of launching the final product.

III,Deploy your product to an environment similar to the production environment
It is usually difficult for your product to run in a non-development environment, especially when the product needs to be deployed in a very complex environment. Automating the deployment process and testing the process as part of continuous integration can alleviate these problems. In addition, this also means that your testers are more likely to test your software in a real environment-in this way, they are more confident that your software can be used.

IV,Identifies your code baseline
Version control tools such as SVN support atomic commit. They can mark each time a developer checks for the version number, but version control tools such as CVs do not support atomic commit. In addition, your source files may be scattered in different code libraries. Therefore, you must mark each build in the continuous integration process. In this way, once a problem is found during the test, you can trace back to the correct version to correct it.

V,Run regression testing
If you have long-running acceptance or regression tests, you 'd better automate them and run them cyclically. Because they run for a long time, they can not be placed in the master build; otherwise, the feedback speed of the master build will be affected. However, you must run the task at least once every night. If possible, the interval can be shorter. This not only gives you extra confidence, but also ensures that you have been updating your regression or acceptance tests. When the code changes, this acceptance test is easy to fail because the Code no longer reflects the requirements.

VI,Generate metric data
You need to be careful with the "measurement" because it has a great impact on your developers. The test coverage rate of a measurement code is a common measurement method that is commonly used by continuous integration. However, it can easily lead developers to write code that is useless but can improve the coverage rate. However, if your team can accept this, using code coverage statistics, code style check, dependency analysis, and other methods can encourage developers to continuously improve code quality.

Of course, you can also do other automated work, such as generating documents and generating database scripts. However, if the most basic automation is not possible, you don't need to do anything else.

For the original article, see the link.

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.