持续集成

https://en.wikipedia.org/wiki/Continuous_integration

为什么要持续?

持续集成, 可以避免集成地狱(由于工作的源码 和 库中的源码的差异导致), 提倡提前集成,并且经常集成。

在集成到主分支之前, 在CI服务器上做一次完整的构建 和 运行通过 所有的单元测试。

Continuous integration involves integrating early and often, so as to avoid the pitfalls of "integration hell". The practice aims to reduce rework and thus reduce cost and time.[4]

A complementary practice to CI is that before submitting work, each programmer must do a complete build and run (and pass) all unit tests. Integration tests are usually run automatically on a CI server when it detects a new commit.

除了在集成过程中做 单元测试 和 集成测试, 这些过程也被运行: 静态测试、动态测试、 度量和记录性能, 从源码中导出格式化文档。

In addition to running the unit and integration tests, such processes run additional static and dynamic tests, measure and profile performance, extract and format documentation from the source code and facilitate manual QA processes. This continuous application of quality control aims to improve the quality of software, and to reduce the time taken to deliver it, by replacing the traditional practice of applying quality control after completing all development.

持续集成,保证合入代码主分支代码的质量。

持续发布和持续部署

在持续集成的基础上, 衍生出软件末游流程的改进概念,持续发布和持续部署。

In the same vein, the practice of continuous delivery further extends CI by making sure the software checked in on the mainline is always in a state that can be deployed to users and makes the actual deployment process very rapid.

VerifyCI & MergeCI

持续集成 分为两个阶段, 一个是合入之前的 模块级别 质量保证, 另外一个是主分支的 质量保证。

前者称为 VerifyCI  --- 代码合入主分支前,代码在工作镜像上,通过单元测试、构建等过程。

后者称为 MergeCI --- 持续集成要求,每天合入主分支多次, 主分支构建多次, 此CI需要保证主分支的质量。 毕竟, 主分支集成属于系统测试范畴。

CRT == continuous regression testing

持续回归测试

regression testing

回归测试,当软件被改动后, 需要保证之前的通过的测试用例,仍然是通过的。

软件的改动,包括 软件增强、打补丁、配置改变。

Regression testing is a type of software testing which verifies that software, which was previously developed and tested, still performs correctly after it was changed or interfaced with other software. Changes may include software enhancements, patches, configuration changes, etc.

回归测试,用于测试系统的有效性, 测试用例通过系统性的选择, 选择测试最小集覆盖特定的变化。

非回归测试, 目的是,在引入或者更新一个给定的软件应用, 改变是否是期望的效果。

我的理解:

回归测试 -- 面向存量功能。

非回归测试 -- 面向增量功能。

Regression testing can be performed to test a system efficiently by systematically selecting the appropriate minimum set of tests needed to adequately cover a particular change.

In contrast, non-regression testing aims to verify whether, after introducing or updating a given software application, the change has had the intended effect.

continuous regression testing

持续回归测试, 利用自动化测试的工具, 定期或者按照条件触发 执行回归测试。

VerifyCI阶段工具

cppunit

https://www.freedesktop.org/wiki/Software/cppunit/

执行单元测试

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests.

This is a continuation of the original cppunit project.

cppcheck

http://cppcheck.sourceforge.net/

静态代码检查工具。 不检查语法错误, 检查若干类型的bug,只检查错误, 不检查正确的。

Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).

AStyle

http://astyle.sourceforge.net/

艺术造型工具,是一款源码 缩进、 格式化、 美化工具。 支持C C++ JAVA.

Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective‑C, C# and Java programming languages.

When indenting source code, we as programmers have a tendency to use both spaces and tab characters to create the wanted indentation. Moreover, some editors by default insert spaces instead of tabs when pressing the tab key. Other editors (Emacs for example) have the ability to "pretty up" lines by automatically setting up the white space before the code on the line, possibly inserting spaces in code that up to now used only tabs for indentation.

The NUMBER of spaces for each tab character in the source code can change between editors (unless the user sets up the number to his liking...). One of the standard problems programmers face when moving from one editor to another is that code containing both spaces and tabs, that was perfectly indented, suddenly becomes a mess to look at. Even if you as a programmer take care to ONLY use spaces or tabs, looking at other people's source code can still be problematic.

To address this problem, Artistic Style was created – a filter written in C++ that automatically re-indents and re-formats C / C++ / Objective‑C / C++/CLI / C# / Java source files. It can be used from a command line, or it can be incorporated as a library in another program.

SourceMonitor

http://www.campwoodsw.com/sourcemonitor.html

通过扫描源码,得出多少代码 和 确认你模块的相对复杂度。 其可以确认有可能有缺陷的代码,然后以此发起代码走查。

此工具使用  C++实现, 每秒扫描一万行代码。

The freeware program SourceMonitor lets you see inside your software source code to find out how much code you have and to identify the relative complexity of your modules. For example, you can use SourceMonitor to identify the code that is most likely to contain defects and thus warrants formal review. SourceMonitor, written in C++, runs through your code at high speed, typically more than 10,000 lines of code per second. SourceMonitor provides the following:

  • Collects metrics in a fast, single pass through source files.
  • Measures metrics for source code written in C++, C, C#, VB.NET, Java, Delphi, Visual Basic (VB6) or HTML.
  • Includes method and function level metrics for C++, C, C#, VB.NET, Java, and Delphi.
  • Offers Modified Complexity metric option.
  • Saves metrics in checkpoints for comparison during software development projects.
  • Displays and prints metrics in tables and charts, including Kiviat diagrams.
  • Operates within a standard Windows GUI or inside your scripts using XML command files.
  • Exports metrics to XML or CSV (comma-separated-value) files for further processing with other tools.

持续集成CI相关的几个概念的更多相关文章

  1. 持续集成(Continuous Integration)基本概念与实践

    本文由Markdown语法编辑器编辑完成. From https://blog.csdn.net/inter_peng/article/details/53131831 1. 持续集成的概念 持续集成 ...

  2. 【OF框架】在Azure DevOps中配置项目持续集成CI服务,推送镜像到Azure容器注册表

    准备工作 开通Azure账号,具有开通服务权限,关键是里面要有钱. 开通Azure DevOps,能够创建组织和项目. 具备一定的DevOps知识,了解CICD概念.Docker基本操作. 一.创建& ...

  3. Jenkins+Gitlab搭建持续集成(CI)环境

    利用Jenkins+Gitlab搭建持续集成(CI)环境 Permalink: 2013-09-08 22:04:00 by hyhx2008in intern tags: jenkins gitla ...

  4. Gitlab+Gitlab-CI+Docker实现持续集成(CI)与持续部署(CD)

    写在前面 记录一下,一个自动化开发部署项目的构建过程与简单使用,实现真正的DevOps gitlab安装 步骤一:安装依赖 yum -y install git gcc glibc-static te ...

  5. 浅谈持续集成(CI)、持续交付(CD)、持续部署(CD)

    CI/CD是实现敏捷和Devops理念的一种方法,具体而言,CI/CD 可让持续自动化和持续监控贯穿于应用的 整个生命周期(从集成和测试阶段,到交付和部署).这些关联的事务通常被统称为"CI ...

  6. 持续集成CI与自动化测试

      -------------------------------------------------------------------------------------------------- ...

  7. 持续集成CI

    一.CI 和 CD 持续集成是什么? 持续集成(Continuous integration,简称CI)指的是,频繁地(一天多次)将代码集成到主干.让产品可以快速迭代,同时还能保持高质量. 持续交付( ...

  8. 基于Jenkins的持续集成CI

    CI(continuous integration)持续集成 一次构建:可能包含编译,测试,审查和部署,以及其他一些事情,一次构建就是将源代码放在一起,并验证软件是否可以作为一个一致的单元运行的过程. ...

  9. 持续集成(CI)工具------Hudson/Jenkins(Continuous Integration)安装与配置具体解释

    本文同意转载.但请标明出处:http://blog.csdn.net/wanghantong/article/40985653/, 版权全部 文章概述: 一. 描写叙述了持续集成工具Hudson的安装 ...

随机推荐

  1. 解决win10“cmd自动弹出一闪而过”问题的方法

    1.禁用CMD win+Q gpedit 打开组策略 用户配置--管理模板--系统--阻止访问命令提示符--已启用. 2.启用PowerShell PS:需要使用CMD时可用powershell代替: ...

  2. CF1096F Inversion Expectation

    逆序对分三类: 1.已知对已知 树状数组直接处理即可 2.未知对未知 设未知数的位置数为\(m\),则有\(m(m-1)/2\)个数对.一个数对是逆序对的期望是\(0.5\)(一个逆序对与一个非逆序对 ...

  3. 树状数组入门 hdu1541 Stars

    树状数组 树状数组(Binary Indexed Tree(B.I.T), Fenwick Tree)是一个查询和修改复杂度都为log(n)的数据结构.主要用于查询任意两位之间的所有元素之和,但是每次 ...

  4. hdu1272 小希的迷宫(并查集)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1272 题目: 小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) ...

  5. Codeforces Round #493 (Div. 2)

    C - Convert to Ones 给你一个01串 x是反转任意子串的代价 y是将子串全部取相反的代价 问全部变成1的最小代价 两种可能 一种把1全部放到一边 然后把剩下的0变成1  要么把所有的 ...

  6. wildfly 10上使用最新的 Hibernate ORM OGM

    ORM是关系型数据库连接:ogm是No sql数据库连接,Mongo, redis等. 1,下载ogm zip包,解压到wildfly_home\modules\system\layers\base, ...

  7. js 打开标签

    JS打开新标签的2种方式 1.超链接<a href="http://www.jb51.net" title="脚本之家">Welcome</a ...

  8. 如何用思维导图快速理解PMBOK-PMP第六版教材

    PMP的教材很多人拿到PMBOK的时候都觉得头疼,这书本这么厚,我什么时候能看完啊,确实是,没有体系,没有框架的看书是很难的,看的很多知识点都无法联系起来.所以利用思维导图来学习PMP就很有效果,下面 ...

  9. crond守护进程实现定时监控某进程占有内存的大小

    1)添加计划任务 crontab -e会使用某个编辑器打开某个文件,然后在内输入需要执行的计划任务,保存后在/var/spool/cron/crontabs/下会出现以用户名命名的文件 2)计划任务如 ...

  10. (最小生成树 并查集)P1111 修复公路 洛谷

    题目背景 A地区在地震过后,连接所有村庄的公路都造成了损坏而无法通车.政府派人修复这些公路. 题目描述 给出A地区的村庄数N,和公路数M,公路是双向的.并告诉你每条公路的连着哪两个村庄,并告诉你什么时 ...