Git branching strategy

随着近些年 Git 的快速普及,想必无论开发还是测试在日常工作中都要用到 Git。

对于刚刚接触的 Git 的人来说,打开一个 Git 仓库,面对十几个甚至几十个分支时,有的人不理解,有的人云里雾里,为什么会创建这么多分支?

对于开发需要知道如何通过 Git 分支来管理产品的开发和发布,尤其是对于大型的项目的开发,只有 master 和 develop 分支是无法满足产品管理和发布要求的,我们还需要其他分支以便更好的管理产品代码。

对于测试更多的了解开发过程及分支管理有助于测试及开展自动化测试用例,可以针对不同的分支进行测试用例的编写,在以后回归测试里可以通过分支或是 tag 找到对应的测试用例。

Read More

通过 Jenkins 来提交修改的代码 git push by Jenkins

在持续集成中,你可能需要通过 Jenkins 来修改代码,并且将修改后的代码提交到Git仓库里。怎么做呢?最方便的做法还是 Jenkins 提供对应的插件,但是很遗憾我没找到合适的。另外我也觉得通过脚本的方式来实现会更加稳定,不用担心 Jenkins 以及插件升级带来潜在不好用的可能。

Read More

Execute sudo without password

在使用 Jenkins pipeline 的时候,在 Linux 需要用 root 来执行,我想通过 Jenkins pipeline 的语法来解决,但是只找到这种方式:SSH Pipeline Steps

Read More

Hexo 添加 Disqus 留言功能

在你的 Hexo 网站添加 Disqus

去 Disqus 创建一个账号,在这个过程中有需要选择一个 shortname,完成后,你可以在设置页码找到你的 shortname

https://YOURSHORTNAMEHERE.disqus.com/admin/settings/general

在你 Hexo 博客里打开 _config.yml, 然后输入 disqus_shortnameand: YOURSHORTNAMEHERE,像这样:

Read More

Jenkinsfile example - 实现交互、clone 多个仓库以及 git push

这个pipeline里包含了如下几个技术:

  • 如何使用其他机器,agent
  • 如何使用环境变量,environment
  • 如何在build前通过参数化输入,parameters
  • 如何使用交互,input
  • 如何同时clone多个repos
  • 如何进行条件判断,anyOf

Read More

Jenkinsfile example - 实现交互、clone 多个仓库以及 git push

这个pipeline里包含了如下几个技术:

  • 如何使用其他机器,agent
  • 如何使用环境变量,environment
  • 如何在build前通过参数化输入,parameters
  • 如何使用交互,input
  • 如何同时clone多个repos
  • 如何进行条件判断,anyOf

Read More

Git 管理

查找是否有遗漏提交

从一个分支找到所有的 commit 和 ticket 号,然后去另外一个分支去查找这些提交是否也在这个分支里。

Read More

Multibranch Pipeline

Problems

Like database product, it runs on multi-platform, but for software enginner they may only works on one platform, how they could identify their code works on all platform? manually build the various platforms? NO!

Solution

Most people would know we can use Jenkins pipeline, they may create multi Jenkins job for different stuation.

How to do it in an elegant way, I would want to share how to use multibranch pipeline to achieve.

  1. When create a pull request, auto parallel start simple build.
  2. Reviewers can decide whether to merge base on build results.
  3. After code merged, auto start full build.

Read More

A Code Coverage Tool - Squish Coco use examples

Preparation

  1. You need to ask for a free trial license and install
    • You will receive a mail with username/password to login for downloading
  2. I test it on the Windows platform, so I download the Windows installer, then install Squish Coco and Add-in
  3. Installed Visual Studio 2010 or higher, I used VS2017 Professional

Read More

Code Coverage tools of C/C++

Code Coverage is a measurement of how many lines, statements, or blocks of your code are tested using your suite of automated tests. It’s an essential metric to understand the quality of your QA efforts.

Code coverage shows you how much of your application is not covered by automated tests and is therefore vulnerable to defects. it is typically measured in percentage values – the closer to 100%, the better.

When you’re trying to demonstrate test coverage to your higher-ups, code coverage tools (and other tools of the trade, of course) come in quite useful.

List of Code Coverage Tools

| Tools | Support Language | Cost | Partners |
|—|—|—|—|—|
| Squish Coco | C, C++, C#, SystemC, Tcl and QML | Not disclosed |Botom of this page Selected Clients|
| BullseyeCoverage | C, C++ |$800 for 1-year license and up | |
| Testwell| C, C++, C#, Java| Not disclosed| |
| Parasoft C/C++test |C, C++ | Not disclosed | partners |
| VECTOR Code Coverage | C, C++ | Not disclosed (free trial available)| partners |
|JaCoCo| Java | Open Source| Most famous code coverage tool in Java area |