Spec定义
# Google SearchThis is an executable specification file. This file follows markdown syntax. Every heading in this file denotes a scenario. Every bullet point denotes a step.To execute this specification, usenpm test## Finding some cheese* Goto Google search page* Google for "Cheese!"* Page title starts with "Cheese"Steps实现step("Goto Google search page", async function() {await goto("www.google.com");});step("Google for <query>", async (query) => {await write(query);await click("Google 搜尋");});step("Page title starts with <content>", async (content) => {await title().then((pageTitle) =>{assert.ok(pageTitle.startsWith(content));});});总结协作是人的问题,工具可以起到辅助作用,但是不能解决根本问题,过于严格的工具缺乏灵活性,反而阻碍了高效协作的可能 。Gauge不强调协作,可以作为自动化测试工具独立存在,同时又支持高效协作、支持实现BDD,是一款灵活性更好的框架 。它的秘密武器Taiko是一款优秀的Web UI自动化工具,两者的结合堪称完美,让需求规范、自动化测试和活文档的有机结合真正成为可能 。
本文只是将Gauge和Taiko跟Cucumber框架从对BDD的角度做简单的对比,更多的关于Gauge和Taiko的高级特性,请参考【延伸阅读】部分相关文章 。
延伸阅读
- 说起BDD,你会想到什么:https://www.bylinzi.com/2015/06/04/when-we-talk-about-bdd/
- Gauge:https://gauge.org/
- Taiko:https://taiko.gauge.org/
- Why I chose Gauge over Cucumber:https://medium.com/@divi6.1990/why-i-chose-gauge-over-cucumber-5b3de478d889
- TEST AUTOMATION WITH GAUGE:http://www.santiagomontesinos.com/test-automation-with-gauge/
推荐阅读
- 推荐一款适合程序员使用的前端框架ZUI,基于Bootstrap深度定制款
- 前端测试框架Jest——语法篇
- 乐高发布新一代MINDSTORMS机器人啦
- 适合收藏 如何将Rasa聊天机器人框架部署到linux,简明教程
- AliOS Things内置的嵌入式GUI框架LittlevGL
- Streamlit是python的一个机器学习、数据科学、应用开发框架
- UI 自动化测试框架设计与 PageObject 改造
- 从网络IO看高性能框架
- Laravel作为PHP框架,它的优点和功能是什么?
- OPPO|比Find X5 Pro更猛!OPPO最强机皇曝光:全新一代2K屏加持
