我有一個項目,看起來像這樣:我應該如何在我的項目中組織測試用例?
xdc/ hubactions/ hubconnection.cpp hubconnection.h uiinterface/ readme uiconnection.cpp uiconnection.h ... uiactions/ readme connectaction.cpp connectaction.h quitaction.cpp quitaction.h ... utils/ parser.cpp parser.h ...
現在我要開始測試項目變得太大了。
那麼我應該如何組織我的測試呢?我想出了兩個選項:
選項1
xdc/ hubactions/ hubconnection.cpp hubconnection.h uiinterface/ readme uiconnection.cpp uiconnection.h ... uiactions/ readme connectaction.cpp connectaction.h quitaction.cpp quitaction.h ... utils/ parser.cpp parser.h ... tests/ utils/ parsertest.cpp uiinterface/ uiconnectiontest.cpp uiactions/ connectactiontest.cpp quitactiontest.cpp hubactions/ fakehubconnection.cpp fakehubconnection.h ...
選項2
xdc/ hubactions/ tests/ fakehubconnection.cpp fakehubconnection.h hubconnection.cpp hubconnection.h uiinterface/ tests/ uiconnectiontest.cpp readme uiconnection.cpp uiconnection.h ... uiactions/ tests/ connectactiontest.cpp quitactiontest.cpp readme connectaction.cpp connectaction.h quitaction.cpp quitaction.h ... utils/ tests/ parsertest.cpp parser.cpp parser.h ...
哪種方法更好?我能以不同的/更好的方式做到嗎?
謝謝!
謝謝,我現在正在爲此項目選擇此方法:) – jrharshath 2009-09-20 07:19:52