Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Tag Archives: Testing

TDD 其實也是測試的一部分

看到一篇很有趣的文章:不要把 TDD 和做測試混為一談

該篇文章摘要如下:

  1. 不該否定TDD 的價值
  2. 測試和TDD不能混為一談

在繼續討論之前,先看看 W Model

大部分人以為測試只有 W Model 的右半邊,也就是說只有 Unit test、Integration test、System test 以及  Acceptance test。

但是實際上測試在 W Model  的左半邊也算,而且在左半邊就開始測更加事半功倍。而TDD 其實就是 Push 開發者作左邊的測試的方法之一。

對於系統應該長甚麼樣,有什麼行為,大多數的使用者、項目經理和  Business Analysts都只有一個模糊的概念。經由 TDD,開發者更有機會在需求面發現實際需求,而不是蓋完房子之後才發現使用者還要窗戶和廁所,到那時才改那就吃力不討好。

 

A software may pass the UAT, yet nobody want to use it

I recently encountered an interested case: we are asked to evaluate a system through user acceptance testing (UAT). I looked at the testing, it is essentially a set of functional tests.

I wonder what’s the difference between functional tests and UAT, and dig out the following link.

http://stackoverflow.com/questions/3370334/difference-between-acceptance-test-and-functional-test/8205070#8205070

According most posts on that thread, the differences between UAT and functional testing are just focus and scope, that is, if functional testing is performed by users for the sake of user, then it’s UAT.

While there is nothing wrong for functional testing including in UAT, however, if UAT only contains functional testing, it is possible that users tick all the box, but still avoid to use the system. For example, if the system requires a complex authentication mechanism to login, while with alternative you don’t have to. Even the system does everything else correctly it was designed, you would most likely to use the alternatives instead of the system.

So stop wondering why your system pass UAT but people deflect to alternatives. Please at lease asks following:

  1. Do you need to use this system?
  2. Do you enjoy using this system? If not, why?

If you feel like it, you may even ask

3. Will you use this system.

You may get interesting results combining the answers of all there question.

Generate JUnit XML format for Jenkins from CMake CTest

In JUnit XML Skeleton fits for Hudson., I showed the minimal JUnit XML for showing  meaningful results in Hudson/Jenkins.

But how to generate the JUnit XML from cmake and ctest?

I got the inspiration from How to get CTest results in Hudson / Jenkins in StackOverflow and create following  CTest2JUnit.xsl.

To use the xsl, you may either use the CTest2JUnit.pl I provide in the same directory, or following command in Linux:

xsltproc CTest2JUnit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > JUnitTestResults.xml