筆記:Automated Journey Testing with Cascade
感覺是一個很好的介紹Cascade的文章。
Key Takeaways
The problem of testing a system is becoming harder as we have larger teams, as we have more processes and as we adopt microservices architecture.(是的,微服務要背鍋)
The testing problem is fundamentally different moving forward. We have less capability for testing specific functional points that we do in the unit test environment.
We are cursed by very costly network calls. And we can't escape this issue, unless you homogenise your tech stack and abstract out the network calls.
We need new tools for dealing with these state machines.The state machine is intrinsically beautiful.
We should take advantage of it.
然後用了很大篇幅分析測試中的問題,最後聚焦在下麵兩個原因:
Too many developers trying to access the same codebase.(過多的開發人員試圖去訪問同一代碼塊。)
The code takes too long to validate, so the semaphore doesn't clear quickly enough.(代碼驗證需要過長的時間,信號燈不能盡快地清空。)
提出:如果能緩解其中任一子問題,那麼該問題就會迎刃而解。
解決方案:
1,將開發人員分為團隊
2,優化測試案例的編排(我的理解),引入Cascade框架
Cascade主要麵對的問題
What do we call these tests? They no longer focus on a particular requirement, but rather meet multiple requirements in one go.
How do we identify gaps? How do we know what we have missed?
How do we identify what scripts are redundant? If we have a new requirement, how can we know where to insert these new assertions?
Cascade特點:
我們將構成一個過程的每個步驟分別定義為獨立的類。進而Cascade框架將可從中管理並生成測試。
在Cascade框架中,廣泛地使用了標注。步驟是維護在不同的文件中的,每個步驟文件用@Step標注。數據采用一種IoC形式在步驟間共享,使用了@Supplies和@Demands標注。生命周期方法標注為@Given、@When和@Then方法。
狀態機的建模,可以在測試報告中生成圖
Cascase可以選擇性地運行特定的測試或組測試
Cascade可以使用算法最小化測試集
Cascade可以命名過程測試
Cascade可使用多種方法最小化測試集
Cascade可以關注測試的覆蓋情況
總結:
The problem of testing a system is becoming harder as we have larger teams, as we have more processes and as we adopt microservices architecture.
The testing problem is fundamentally different moving forward. We have less capability for testing specific functional points that we do in the unit test environment.
We are cursed by very costly network calls. And we can't escape this issue, unless you homogenise your tech stack and abstract out the network calls.
We need new tools for dealing with these state machines.
The state machine is intrinsically beautiful. We should take advantage of it.
最後更新:2017-11-03 10:03:40
上一篇:
阿裏EB級大數據體係,如何做到秒級響應、高效賦能?
下一篇:
Spring AOP從入門到放棄之概念以及Spring Boot AOP demo
傳奇數學家拉馬努金留下的數學神諭,解開了多年懸而未決的神秘難題
【最近麵試遇到的一些問題】運行時異常與一般異常有何異同
Access數據庫訪問助手類
如何在 Apache 中重定向 URL 到另外一台服務器
J2EE中自定義標簽以及TagSupport和BodyTagSupport的用法
山西省醫院協會牽手科大訊飛 依托省人民醫院推進 “ AI + 醫療”落地
阿裏雲ECS服務器配置怎麼選擇?(新手教程)
不如到雄縣的街頭走一走
android:launchMode="singleTask" 與 onNewIntent(Intent intent) 的用法
《Ansible權威指南》一1.2 Ansible發展史