感謝 Bruce 的整理,是滴,內建 create unit test from production code 的功能,又從 VS2015 回來了。
http://blog.kkbruce.net/…/vs2015-create-unittest-and-add-nu…
#VS2015 #UnitTestGenerator #TestFrameworkAdapter
這回就跟 VS2013 可以透過 extension, 將 MsTest 以外的 Test Framework 整合進 test explorer 裡面一樣。內建的 unit test generator 也可以透過 extension 來將不同的 test framework 整合進去。(其實一點都不意外,因為 specflow 也是這樣幹,只要設定 unitTestProvider 就可以自動產生 scenario 對應的 test class)
和好友 陳傳興(Bruce) 在 facebook 上討論時,則讓我想到神雕俠侶裡面,楊過看獨孤求敗留言的那一段:
①「紫薇軟劍」三十歲前所用,誤傷義士不祥,悔恨無已,乃棄之深谷。
②重劍無鋒,大巧不工,四十歲前恃之橫行天下。
③四十歲後,不滯於物,草木竹石均可為劍。自此精修,漸進於無劍勝有劍之境。
--
一開始不會TDD時,先學會用這個內建功能來產生測試的template。
接著針對沒有測試的legacy code, 透過它來建立對應的相關測試。
最後不滯於物的境界,在還沒有 production code 的時候,不需要什麼工具,只要有需求就可以寫好測試程式了。
by the way, 這也是為什麼我對 VS2015 中的 IntelliTest (from Pex and Moles: http://research.microsoft.com/en-us/projects/pex/) 只覺得終於內建了,但仍提不起興趣的原因。
一切只要有需求,測試案例、測試程式、production code 就是自然的一路長出來。
長骨頭→填肉→長骨頭→填肉→長骨頭→填肉…這就是BDD+TDD的fu...
同時也有10000部Youtube影片,追蹤數超過2,910的網紅コバにゃんチャンネル,也在其Youtube影片中提到,...
scenario generator 在 Random scenario generator for Dungeon Universalis - YouTube 的美食出口停車場
Choose the type of mission, the faction to face, the number of heroes and the VPs of the group, the type of scenario (city, castle, dungeon, ... ... <看更多>