201421123117 李永豪 201421123114 鄭靖濤git
需求分析:框架
1.整數加減乘除的測試;單元測試
2.真分數加減乘除的測試;學習
3.最小值測試;測試
4.最大公約數測試;編碼
5.最大公倍數測試;spa
測試框架:.net
項目以JAVA開發,而後使用JUNIT4進行測試。設計
測試用例:代碼規範
1.整數加減乘除的測試:
public class CalculatorTest { @Test public void testCalculatorint() { Calculator calculator=new Calculator(); calculator.Calculatorint(2,2,"+"); assertEquals(4, calculator.getResult()); calculator.Calculatorint(2,2,"-"); assertEquals(0, calculator.getResult()); calculator.Calculatorint(2,2,"*"); assertEquals(4, calculator.getResult()); calculator.Calculatorint(2,2,"/"); assertEquals(1, calculator.getResult()); } }
2.真分數加減乘除測試:
3.最小值、最大公約數、最小公倍數測試:
4.總體覆蓋率:
小結與感覺:
經過使用單元測試這個功能,雖然剛剛開始的時候被弄得手慢腳亂,但是真的使用以後確實是能夠感覺到單元測試能夠將本身的代碼一個一個類的進行檢查,能夠找到哪些代碼是錯誤了,有助於我更好的修正代碼。
coding地址:https://git.coding.net/a434961671/goujian.git
PSP:
PSP2.1 | Personal Software Process Stages | Time (%) Senior Student | Time (%) |
Planning | 計劃 | ||
· Estimate | 估計這個任務須要多少時間 | 50h | 48h |
Development | 開發 | ||
· Analysis | 需求分析 (包括學習新技術) | 1h | 2h |
· Design Spec | 生成設計文檔 | 0 | 0 |
· Design Review | 設計複審 | 0 | 0 |
· Coding Standard | 代碼規範 | 1h | 1h |
· Design | 具體設計 | ||
· Coding | 具體編碼 | 40h | 40h |
· Code Review | 代碼複審 | 2h | 1h |
· Test | 測試(自我測試,修改代碼,提交修改) | 5h | 4h |
Reporting | 報告 | 1h | 1h |
·Test Report | 測試報告 | 0 | 0 |
· Size Measurement | 計算工做量 | ||
·Postmortem & Process Improvement Plan | 並提出過程改進計劃 |