为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

持续集成手册-2008-11-26

2013-12-14 42页 doc 1MB 11阅读

用户头像

is_631338

暂无简介

举报
持续集成手册-2008-11-26 持续集成 基于开源工具的持续集成团队开发环境 版本 1.0 修订记录 日期 版本 描述 作者 20/Sep/2007 0.1 Created by author 汪 浩 26/Nov/2008 1.0 Updated based on the review records 汪 浩 内 容 41. Team Development Environment Introduction 1.1 Who are the main users of team deve...
持续集成手册-2008-11-26
持续集成 基于开源工具的持续集成团队开发环境 版本 1.0 修订记录 日期 版本 描述 作者 20/Sep/2007 0.1 Created by author 汪 浩 26/Nov/2008 1.0 Updated based on the review records 汪 浩 内 容 41. Team Development Environment Introduction 1.1 Who are the main users of team development environment? 5 1.1.1 Development Team 5 1.1.2 Test Team 5 1.1.3 Admin Team 5 1.2 What does Team Development Environment support? 5 1.2.1 Code Quality Management 5 1.2.2 Version Control 6 1.2.3 Unit Test and Test-Driven Development 6 1.2.4 Successful Build 6 1.2.5 Continuous Integration 6 1.3 What elements does Team Development Environment include? 6 1.3.1 Logic Machines 7 1.3.2 Team Development Environment related Processes 8 1.3.3 Tools for Team Development Environment 9 2. .Net Solutions and Projects 10 2.1 Overview 10 2.2 Sample .Net applications 10 3. Open Source Tools for Team Development Environment 12 3.1 Tools Combination for Team Development Environment 12 3.1.1 Open Source Tools Candidates for Team Development Environment 12 3.1.2 Tools Selection & Combination for Team Development Environment 17 4. Team Development Environment related Processes 20 4.1 Prepare Team Development Environment 20 4.2 Develop Projects 27 4.2.1 Create New Project 27 4.2.2 Update Existing Project 33 4.3 Build Projects 34 4.4 Monitor & Control Projects 37 4.5 Maintain Environment 37 5. Appendix 40 5.1 References 40 基于开源工具的持续集成团队开发环境 This document provides guidance and practices to enable people to set up a team development environment with open source tools for .Net projects , which can provide project team with capability of version control, continuous integration, build, test, issue tracking, collaboration mail notification and even deployment. 1. 团队开发环境介绍 当今的项目开发大多是根据所构建的系统范围按团队形式组织的。无论团队采用何种开发论,团队开发环境都极大地依赖于角色、和工具的密切统一。这些要素的协同一致为基于团队开发的项目成功提供了有力保证 If we regard the team development environment as a system, people with roles for project will be the customer of the system, for example, business analysis, requirement analyst, software architect, project manager, etc. But in this document, we are only focusing three of the six core aspects of software development, which can be depicted using following use case diagram, see Figure 1. Figure 1 supporting scope of software development environment 1.1 Who are the main users of team development environment? For software development environment, development Team and test team are the primary users; while admin team including source control admin, build manager, release manager are the secondary users. 1.1.1 Development Team Inside the development team, different roles are focusing on different goals. Here we just list two main roles: Table 1 User Profile for Development Team User Goals Software Developer Easy to ensure the source code integrity; Easy to ensure software quality; Easy to get the latest build as basis for further development; Easy to know the status of the whole project, especially the build, integration, package and defect information Project Leader Easy to master the project status, including code implementation, build, code quality, test status, defect information, etc. 1.1.2 Test Team This group of users will be discussed in the next version of BeyondTooling project. 1.1.3 Admin Team Inside the admin team, different roles are focusing on different goals. Here the main roles are listed: Table 2 User Profile for Admin Team User Goals SCM Admin Easy to setup and maintain SCM system Build Manager Easy to setup and maintain build scripts; Easy to monitor and control the build procedure Release Manager Easy to manage the release procedure 1.2 What does Team Development Environment support? 1.2.1 Code Quality Management During software development phases, people like to identify and fix quality issues early to prevent higher rework cost in the later phase. Code Quality Management is just such approach which can support the prevention and detection of defects during early development phases. Identifying error-prone artifacts can be helpful for later test activities focusing. Now, normally manual code inspection and review are used to ensure code quality, but due to the effort and efficiency, they are often skipped by project teams. In section ‎1.2.1, we will introduce code quality management tools, which can help code quality management easier and more efficient. 1.2.2 Version Control Software products are now growing increasingly complex while development cycles are becoming shorter. Without version control to ensure the integrity of work product, it will be a disaster for project team. So, supporting version control should be a must for the team development environment. The basic version control requirements for team development are: · Developer can check in and checkout sources without knowing detailed information of SCM implementation · Build machine can fetch the latest sources from SCM system without human intervention · SCM system can label the indicated sources to build a labeled baseline 1.2.3 Unit Test and Test-Driven Development Unit tests are small pieces of code that are written to ensure developer’s own implementation for some software features or use cases. In object oriented world, it means that developers should test their own unit – class implementation and make sure it works before he or she can submit the implementation to build. A related methodology is Test-Driven Development (TDD), which promotes the writing of tests prior to writing the code that is being tested. By supporting TDD and Unit Test, team development environment can · make developer confident to make change to the work product · support the regression test for unit test cases, which will make sure the integrity of the whole project result 1.2.4 Successful Build Here the “Build” means a successful build, which means that the build should fulfill the following goals: · All the latest sources are checked out of the software configuration management system · Every file and project are compiled successful with dependency consideration · The build result can be deployed for execution · The code inspection is passed with the indicated rules · The test cases execution results pass with criteria, e.g., statement coverage · The build process is automatically executed without human intervention · The build result can be easily communicated within stakeholders for team development environment 1.2.5 Continuous Integration The term 'Continuous Integration' originated with the Extreme Programming (XP) development process, as one of its original twelve practices. With continuous integration, development team can address any integration issues early and can resolve these issues as they arise. In order to support such feature, team development environment must support: · Each modification is identified by team development environment · Each modification is integrated with existing sources automatically · The build process and regression unit test will be executed without human intervention 1.3 What elements does Team Development Environment include? Although the features mentioned in above section are separated aspects, they are highly combined with roles, processes, machines, and tools to ensure final project successful . So, the roles, processes and tools are the key elements for the successful team development environment, see Figure 2. Figure 2 the team development environment The users or roles related to team development environment have been introduced in Section 1.1. 1.3.1 Logic Machines Actually the logic machines can be regarded as hardware for the team development environment. The machines and their responsibility can be depicted as in following table. Table 3 Machine Profile for Team Development Environment Machine Responsibility Workstations Workstations are used by development team for code implementation, code inspection and unit test. The SCM client system should be installed here for development team to access SCM system. All workstations should be configured in the same style for the development team. SCM Server SCM Server is the host machine for SCM server system to ensure the integrity of project sources. On the one hand, it will communicate with developers for check in and checkout, while on the other hand, it support Build Server to get latest sources for build process. Build Server Build Server is host machine for continuous integration, build process, code inspection, regression unit test, and install kit package. The output assemblies and install kit generated are maintained in folders on this server. Web Server Web Server is responsible for the build result information publishing. Database Server (Optional) Database Server is used for the project with database related functionalities. It is optional depending on the project characteristics. Test Workstations Test Workstations is used by test team for product features verification and validation. Issue Server Issue Server can also be called as defect tracking management server, which is used for issue management, e.g., issue logging, assigning, fixing and closing. 1.3.2 Team Development Environment related Processes Team Development Environment related Processes are used here to glue all the other elements together. Figure 3 depicts the workflow overview. Figure 3 Team Development Environment related Processes – Workflow Overview Here five main workflow details are covered: · Prepare Team Development Environment – in this workflow detail, the team development environment will be setup, which includes physical machine allocation, tools installation, tools configuration and integration. More detailed information can be found in Section ‎4.1. · Develop Projects – this workflow detail depicts how development team cooperates with team development environment, including sources development, unit test, code inspection and version control. It mainly include two successful scenarios: · Create New Project · Update Existing Project More detailed information can be found in Section ‎4.2. · Build Projects – Here ‘build’ means continuous integration and successful build. This workflow detail includes following activities: identify modification, fetch latest sources, build with indicated build scripts, implement code inspection and unit test, label successful build, package install kit and publish build result. More detailed information can be found in Section ‎4.3. · Monitor & Control Projects – in this workflow detail, project status will be monitored and controlled by development project leader. More detailed information can be found in Section ‎4.4. · Maintain Environment – this workflow detail mainly focuses on the technical services, which includes maintaining the development infrastructure, both the hardware and software, system administration, backup . More detailed information can be found in Section ‎0. The more detailed information for each workflow detail will be discussed in Section ‎4. 1.3.3 Tools for Team Development Environment Tools are also regarded as software for the team development environment, which are software or systems deployed on the logic machines for the purposes mentioned in Section ‎1.2. For the tools usage, people should consider following challenges: · Tools selection - For one main function, there are more than one tool on the market. Which tools should be used by the teams? · Tools Integration - More and more new conceptions are involved in the development processes. How to integrate different tools from different companies to one environment? · Customization and Extension - More or less, tools customization is necessary for the processes. · Maintenance - Tools update is more frequent. How to maintain existing tools is another challenge. 2. .Net Solutions and Projects 2.1 Overview In this document, we are focusing the development projects, which adopt .Net solutions. As mentioned in Section 1, .Net project related Project files are used by Visual Studio .NET as containers for configuration settings that relate to the generation of individual assemblies. And such projects files are organized by .Net Solutions files. See Figure 4. Figure 4 .Net Solutions and Projects For a large development project, lots of .Net Solutions and Projects will be used to implement the project requirements. So the dependencies should also be considered. Because this document is focusing on team development environment, here we just give a brief introduction about .Net Solutions and Projects. More detailed information about .Net Solutions and Projects can be found in [2]. 2.2 Sample .Net applications In order to facilitate the illustration of our solution for team development environment with open source tools, two solutions are created. Here the CSharp (C#) language is used to implement the source codes. The folder structure in workstation looks as such after the .Net Solutions have been created: Figure 5 Sample .Net Solutions folder structure The whole application has two .Net Solutions, and each one has one .Net Project. So, there are two solution files in BeyondTooling.Book and BeyondTooling.Library folder: · . \example\src\BeyondTooling.Book\Book.sln · . \example\src\BeyondTooling.Library\Library.sln In solution – BeyondTooling.Book, there is one .Net Project – Book, which source code looks as: Figure 6 Source code for Book project And in solution – BeyondTooling.Library, there is another .Net Project – Library, which source code looks as: Figure 7 Source code for Library project From code a dependency can be identified between Library project and Book project. The Library project needs to use the information from Book project. All the following illustration will use above two .Net solutions as basis. 3. Open Source Tools for Team Development Environment 3.1 Tools Combination for Team Development Environment In order to get the suitable tools for supporting software development team environment, we first investigate the state of arts of open source tools used for .Net project development environment. The basic requirements for .Net project development are listed: · Windows XP as Operation System for all the machines introduced in Section ‎1.3.1. · .Net Framework 2.0 as development framework for .Net Project 3.1.1 Open Source Tools Candidates for Team Development Environment Based on the requirements mentioned in Section ‎1.2, we get open source tools candidates for team development environment. 3.1.1.1 Tools for Code Quality Management · FxCop FxCop is a code analysis tool that checks .NET managed code assemblies for conformance to the Microsoft .NET Framework Design Guidelines []. It uses reflection, MSIL parsing, and calls graph analysis to inspect assemblies for more than 200 defects in the following areas: Library design, Localization, Naming conventions, Performance, and Security. The brief information is listed: Version 1.35 Programming Language .NET Prerequisite .Net 2.0 Installed Operating System Windows Vendor Microsoft License END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE Download http://www.gotdotnet.com/team/fxcop/ · Vil Vil provides metrics, visualization, querying, and analysis of .NET assemblies, classes, and methods for all .NET languages, including C# and Visual Basic.NET.. The brief information is listed: Version 1.1 now, 2.0 coming Programming Language .NET Prerequisite .Net 2.0 Installed Operating System Windows Vendor 1bot.com License Unknown Download http://www.1bot.com/ 3.1.1.2 Two Popular Tools for Version Control · CVS CVS is a version control system, an important component of Source Configuration Management (SCM). Using it, you can record the history of sources files, and documents. It fills a similar role to the free software RCS, PRCS, and Aegis packages. The brief information is listed: Version 1.11.22 Programming Language Any Prerequisite None Operating System Any Vendor http://www.nongnu.org/cvs/ License GNU General Public License Download http://www.nongnu.org/cvs/ The related client tool is TortoiseCVS, which can be found from: http://www.tortoisecvs.org/. · Subversion The goal of the Subversion project is to build a version control system that is a compelling replacement for CVS in the open source community. More features can be found in website. The brief information is listed: Version 1.4.2 Programming Language Any Prerequisite None Operating System Any Vendor http://subversion.tigris.org/ License Apache/BSD-style open source license Download http://subversion.tigris.org/ The related client tool is TortoiseSVN, which can be found from: http://tortoisesvn.tigris.org/. 3.1.1.3 Tools for Unit Test · NUnit NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current production release, version 2.2, is the fourth major release of this xUnit based unit testing tool for Microsoft .NET. It is written entirely in C# and has been completely redesigned to take advantage of many .NET language features, for example custom attributes and other reflection related capabilities. NUnit brings xUnit to all .NET languages. The brief information is listed: Version 2.2 Programming Language C# Prerequisite .Net 2.0 Installed Operating System Windows Vendor http://www.nunit.org/ License GNU General Public License Download http://www.nunit.org/ · csUnit csUnit is your unit testing tool for the Microsoft .NET Framework. You can use it with all .NET languages including C#, Visual Basic .NET, J#, and managed C++. The brief information is listed: Version 2.0.4 Programming Language C# Prerequisite .Net 2.0 Installed Operating System Windows Vendor http://www.csunit.org/ License the zlib/libpng license Download http://www.csunit.org/ · NCover NCover provides statistics about your code, telling you how many times each line of code was executed during a particular run of the application. The most common use of code coverage analysis is to provide a measurement of how thoroughly your unit tests exercise your code. After running your unit tests under NCover, you can easily pinpoint sections of code that are poorly covered and write unit tests for those portions. Code coverage measurement is a vital part of a healthy build environment. The brief information is listed: Version 1.5.5 Programming Language C# Prerequisite .Net 2.0 Installed Operating System Windows Vendor http://ncover.org License Unknown Download http://ncover.org · NCoverExplorer NCoverExplorer is a C# WinForms tool for browsing highlighted source code using code coverage results produced by NCover. The brief information is listed: Version 1.5.5 Programming Language C# Prerequisite .Net 2.0 Installed Operating System Windows Vendor http://ncover.org License Unknown Download http://ncover.org The snapshot of NCoverExplorer is shown in Figure 8. Figure 8 Snapshot of NCoverExplorer 3.1.1.4 Tools for Build Management · NAnt NAnt is a free .NET build tool. In theory it is kind of like make without make's wrinkles. In practice it's a lot like Ant.. The brief information is listed: Version 0.85 Programming Language C# Prerequisite .Net 2.0 Installed Operating System Windows Vendor http://nant.sourceforge.net/ License GNU General Public License Download http://nant.sourceforge.net/ · MSBuild MSBuild is the build platform for Microsoft and Visual Studio. The brief information is listed: Version 1.1 Programming Language C# Prerequisite .Net 2.0 Installed Operating System Windows Vendor Microsoft License END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE Download http://msdn2.microsoft.com/en-us/library/wea2sca5.aspx 3.1.1.5 Tools for Continuous Integration · CruiseControl.NET CruiseControl.NET (CCNet) consists of
/
本文档为【持续集成手册-2008-11-26】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索