雖然我無玩過TDD, 亦無好深入了解, 但以我既理解應該會受限application / language

或者我舉個好簡單既 ...
3ldk 發表於 2017-3-23 02:40


如果情況係複雜少少
個window layout唔係固定
係俾個user open一個file, 然後跟據個file再出唔同layout (入面save住要出乜button/textbox, x/y/width/height)
咁呢D情況就應該點寫test case?

TOP

雖然我無玩過TDD, 亦無好深入了解, 但以我既理解應該會受限application / language

或者我舉個好簡單既 ...
3ldk 發表於 2017-3-23 02:40


https://msdn.microsoft.com/en-us/library/hh212233.aspx

TOP

雖然我無玩過TDD, 亦無好深入了解, 但以我既理解應該會受限application / language

或者我舉個好簡單既 ...
3ldk 發表於 2017-3-23 02:40


師兄形容嘅係 e2e (end-to-end) test case。呢種 test case 盡量模仿 user flow,一次過 test 曬由 frontend 到 backend 到 database 所有嘢。

除咗 e2e,仲有 unit test 同 functional test。佢地嘅分別就唔詳述,但一般嚟講 unit test : function test : e2e test 嘅比例應該大約係 6 : 3 : 1。 e2e test 佔最少因為 implementation effort 大之餘仲要成日 update。

TOP

雖然我無玩過TDD, 亦無好深入了解, 但以我既理解應該會受限application / language

或者我舉個好簡單既 ...
3ldk 發表於 2017-3-23 02:40

巿面上有好多做 UI test o既系統. Mercury Test Director / Quick Test Pro (後來俾 HP 買左) 用VB script 左個 UI interaction, 做web 有 selenium...

不過學樓上師兄講, UI testing update 到仆街 :)

TOP

其實clean code就係寫D 畀人類睇得明既改

所以點解要改名, 玩行數, 玩indention, 拆大function
仲有unit test既意義都係為左有live documentation

TOP