星期一, 1月 01, 2007

軟體測試的分類

從測試內容與實作細節有沒有關係來做區分:


  • White-Box Test: 測試內容只與軟體介面有關
  • Black-Box Test: 測試內容除了與軟體介面有關之外,還與特定實作有關

從測試的層級來區分(單一開發者-->多開發者-->專案-->客戶)

  • Unit Test: 測試單一元件
  • Integration Test: 測試多個元件
  • System Test: 測試整個系統
  • Acceptance Test: 測試客戶需求
    • Alpha Test: 公司內部模擬客戶來測試需求
    • Beta Test: 由實際客戶來進行測試

從目的來定義

  • Regression Test:
    根據Wikipedia:
    • 任何用來發掘regression bugs的測試都叫做regression test
      (Regression testing is any type of software testing which seeks to uncover regression bugs)
    • 當原先正常功能後來被改壞掉時,我們稱之產生了一個regression bug
      (Regression bugs occur whenever software functionality that previously worked as desired stops working or no longer works in the same way that was previously planned)

星期日, 12月 31, 2006

Agile Software Development相關教學

WebCasts

  • Test-Driven Development in Microsoft .NET (James Newkirk, Alexei Vorontsov)
  • Test-Driven Development, by Example (Kent Beck)
  • Test-Driven Development, A Pratical Guide (David Astels)
  • Unit Testing in Java (Johannes Link)

網站

Blogs

星期一, 12月 25, 2006

顯示容易看的MSBuild Log

若要在Dashboard上顯示容易看的MSBuild Log,只要在「C:\Program Files\CruiseControl.NET\webdashboard\dashboard.config」中加上以下設定即可

<xslreportbuildplugin description="MSBuild Details" actionname="MSBuildDetailsBuildReport" xslfilename="xsl\msbuild.xsl"/>

星期四, 12月 07, 2006

實作Equals method以及equality operator需遵守的規則

MSDN上提到:

The following rules outline the guidelines for implementing the Equals method and the equality operator (==):


  1. Implement the GetHashCode method whenever you implement the Equals method. This keeps Equals and GetHashCode synchronized.


  2. Override the Equals method whenever you implement the equality operator (==), and make them do the same thing. This allows infrastructure code such as Hashtable and ArrayList, which use the Equals method, to behave the same way as user code written using the equality operator.


  3. Override the Equals method any time you implement the IComparable Interface.


  4. Consider implementing operator overloading for the equality (==), not equal (!=), less than (<), and greater than (>) operators when you implement IComparable.


  5. Do not throw exceptions from the Equals or GetHashCode methods or the equality operator (==).

有空再來探討其背後的原因

Java與C#的string equal與==

根據陈叙远的世界


java:
String s1 = "abc";
String s2 = new String("abc");
String s3 = "a" + "bc";
System.out.println(s1.equals(s2));
System.out.println(s1.equals(s3));

System.out.println(s1 == s2);
System.out.println(s1 == s3);

c#:
String s1 = "abc";
String s2 = new String(new char[] {'a', 'b', 'c'});
String s3 = "a" + "bc";

Console.WriteLine(s1.Equals(s2));
Console.WriteLine(s1.Equals(s3));

Console.WriteLine(s1 == s2);
Console.WriteLine(s1 == s3);

运行结果是:
java:
true
true
false
true

c#:
true
true
true
true


星期二, 12月 05, 2006

Excel如何做到類似SQL select功能?

  1. 先利用MATCH巨集確認符合條件的資料的順位, 如 =MATCH(F6,$A$1:$A$150,0)
  2. 利用=INDIRECT("B" & A6) 取用相關資料

轉換Pukiwiki到Trac wiki

暫時找不到好的解決方案, 先採用下列Ultraedit macro來轉換

InsertMode
ColumnModeOff
HexOff
UnixReOn
Top
Find RegExp "^\*\*\*\s*(.*)$"
Replace All "=== \1 ==="
Find RegExp "^\*\*\s*(.*)$"
Replace All "== \1 =="
Find RegExp "^\*\s*(.*)$"
Replace All "= \1 ="
Find RegExp "^---\s"
Replace All " * "
Find RegExp "^--\s"
Replace All " * "
Find RegExp "^-\s"
Replace All " * "
Find RegExp "\[#........\]"
Replace All ""
Find RegExp "\[\[(.+)\]\]"
Replace All "[wiki:\1]"
Find "|"
Replace All "||"
Find RegExp "~$"
Replace All "[[br]]"