Teach you how to capture quickly. Hidden bugs in the net code

Source: Internet
Author: User
Tags command line dedicated server visual studio

One aspect of team development is to allow individual developers to write and build unique code locally before merging all the changes into the central repository. Developers can test and debug the latest version locally, and they can ensure that all of their work code works with other colleagues, they can test the code manually, but a better way is to automate the process and provide instant feedback, and one of the most outstanding solutions is continuous integration.

  Continuous integration

For the application software development team, there are many ideas to improve product quality and efficiency, one of the ideas is called continuous integration, one of the prerequisites for continuous integration is instant feedback. One of the simplest forms of continuous integration is for a developer to do all the work, because all changes are immediately visible, a single developer knows the problem when they have problems, and when the same approach is applied to a team environment, the real-time approach becomes a problem.

The most important feature of continuous integration is that when developers submit their work, they can reduce the time that other developers use to detect bugs, and it is often difficult to trace the root cause of the problems caused by these bugs, because the problem is usually due to the integration of new code, Bugs that occur as a result of integration may have been embedded in the code for a long time before a problem occurs, and instead of spending a few hours chasing them, it is important to find the problem sooner rather than later.

With the help of the continuous integration approach, most bugs can be found when the code is introduced, because these "suspects" (the developer's code) are not errors until they submit new code, so it's more obvious. So, spend less time tracking down these bugs, developers will have more time to solve their own problems, the end result is productivity improvement, but this method also depends on the frequency of building a new version, so as to provide valuable feedback to developers.

  When to build?

I remember the projects I worked on a few years ago, it takes a lot of time and effort to make a build, to remind developers to submit their code, and the manual build process is very tight, and naturally, when the code for the development team is built, the error Santo, and it takes time to track these problems, And you want to be able to solve the problem in the right direction in order to be successful, and the time it takes is often to lead to a reduction in the number of builds, but multiple builds are easier to benefit from continuous integration.

If you want to know what the conditions are for a successful build, the answer depends on your project and the environment, but I often define it as all the source files have been successfully compiled, deployed, and a series of tests have been successful in the system, and you need a series of tools to do this, although automated testing (automated Testing) is not required, but I strongly recommend this approach.

  Tools

The following is in. NET environment to create a list of the tools necessary to run a continuous integration approach:

• Source code Control: This allows multiple programmers to collaborate on application code by submitting, paging, and adding new files, and Visual SourceSafe is a popular choice, but there are many better choices, such as SUBVERSION,IBM ' s Rational Clearcase,cvs and SourceGear Vault.

• Compilers: You can use. NET Framework command line compiler, Visual Studio. NET or other integrated development environment.

• Continuous Integration Server: This is the main controller of the build process, it monitors the source repository for code submissions for programmers, and when new code is added, the latest version is retrieved and the build process is canceled, and the final step in the continuous integration process is to communicate the status of the build to the entire team in the form of e-mail, Web pages, and so on. There are a lot of tools to do this, I prefer cruisecontrol.net, the other option is free draco.net, you need a dedicated server to achieve this step.

• Automated build tools: Tools for automatic building of source code are essential, free Nant is a great choice, or you can use a program generation tool, and if you are using the latest version of Cruisecontrol.net, you can work with visual SourceSafe a direct conversation so that you don't need an automated build tool like Nant.

• Selective unit Testing: Applying unit tests in the integration phase can help validate working code, and a very good tool is NUnit, which is free and has a lot of relevant information on the Web.

Note: Installing and setting up these tools is beyond the scope of this article, but the documentation provided by the network community for each product contains the information you need to use these products.

  Are you ready to use continuous integration?

Continuous integration is not a panacea for defect code, but it definitely frees up your precious time to deal with more stressful issues, and developers still need to write strong code and perform good unit tests, and the code should be submitted in accordance with the rules (I recommend daily submissions), however, Continuous integration can help you validate the quality of code, testing, design, and continuous integration can help you save time for your build, but you need some time to set up and manage servers dedicated to continuous integration.



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.