Fitnesse安裝比較簡單java
1.確保機器上已經安裝了java環境瀏覽器
2.到Fitnesse的官網上http://fitnesse.org/FitNesseDownload下載fitnesse-standalone.jar測試
須要注意的是fitnesse對java版本又要求,若是java版本不符合要求啓動的時候會報錯this
3.下載完成後,啓動Fitnesse,輸入命令java -jar fitnesse-standalone.jarspa
4.打開瀏覽器輸入http://localhost:80/,便可看見Fitnesse的界面code
編寫一個小例子測試運行blog
表格:源碼
!path C:\sandbox\workspace\Automation\bin
!define TEST_SYSTEM {slim}it
|fixture.Division|
|numerator|denominator|quotient?|
|10 |2 |5 |
|12.6 |3 |4.2 |
|100 |4 |33 |io
源碼:
public class Division { private double numerator, denominator;
public void setNumerator(final double numerator) { this.numerator = numerator; }
public void setDenominator(final double denominator) { this.denominator = denominator; }
public double quotient() { return this.numerator / this.denominator; } }
點擊Test按鈕
測試成功,經過的case顯示綠色,不經過的顯示紅色,不經過的把實際返回值顯示出來