相关疑难解决方法(0)

如何在黄瓜功能之间使用通用/共享"块"?

我是黄瓜新手,但享受它.

我目前正在编写一些Frank测试,并希望在多个功能中重复使用黄瓜块的块 - 如果可能的话,我想做黄瓜级别(不在红宝石内).

例如,我可能有4个脚本,都是从执行相同的登录步骤开始的:

  given my app has started
     then enter "guest" in "user-field"
     and enter "1234" in "password-field"
     and press "login"
  then I will see "welcome"
  then *** here's the work specific to each script ***
Run Code Online (Sandbox Code Playgroud)

有没有办法在多个脚本之间共享前5行?某种"包含"语法?

cucumber

19
推荐指数
1
解决办法
1万
查看次数

标签 统计

cucumber ×1