- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在用生菜来学习 Django 中的 BDD,同时我想到了一种情况,即不同场景中的两个步骤碰巧具有相同的名称,例如,
Feature: a feature A
Scenario: a scenario S1
Given this is the conflicted step
Then chect the result of scenario S1
Feature: a feature B
Scenario: a scenario S2
Given this is the conflicted step
Then chect the result of scenario S2
@step(r'this is the conflicted step')
def mytest(step):
# do test
@step(r'a feature A', r'this is the conflicted step')
def aaaa(step):
# do test
@step(r'a feature B', r'this is the conflicted step')
def bbbb(step):
# do other test
最佳答案
我不熟悉生菜,但在 Cucumber 中,您有 Background
的概念。 .
使用 Background
,您可以为所有场景定义一个共享的“给定”步骤,因此您可以删除冲突的步骤。
如果这不是您所需要的,那么您将不得不更改步骤的文本,以更具体地说明它们的作用,以消除冲突。
关于namespaces - 如何避免 BDD 中的名称冲突(生菜),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11966052/
需要帮忙,我们的服务使用的是lettuce 5.1.6版本,一共部署了22个docker节点。 每当部署服务时,都会出现几个 docker 节点 ERROR: READONLY You can't w
我如何在生菜测试(django)中编写背景,背景在每个场景之前运行,在 cucumber 中我可以写这样的背景: Feature: Multiple site support As a Mephi
我是在 Django 中使用生菜进行 BDD 开发的新手,但是,我需要帮助来弄清楚如何为我的模型加载初始测试数据以及如何在每次测试之前刷新它们。 最佳答案 我认为最简单的起点是查看 http://le
我正在用生菜来学习 Django 中的 BDD,同时我想到了一种情况,即不同场景中的两个步骤碰巧具有相同的名称,例如, Feature: a feature A Scenario: a sce
我有一个像这样的 lua 脚本,它在远程 redis 集群上执行 hgetall 命令: String shaFindAccount = syncCommands.scriptLoad("local
我正在为 python 使用 Lettuce BDD 框架,我想知道如何从另一个场景中运行一个场景。 例如,假设有一个“注册”场景建立了一些先决条件,这些先决条件将被后续场景(比如“ Action ”
我正在使用 tile38.com与 lettuce.io在Java上。我正在尝试根据文档 enter link description here 发送自定义 NEARBY fleet FENCE PO
我对Redis和AWS ElastiCache服务是完全陌生的。我创建了一个Redis集群(5.0.6 v),其中包含1个分片,2个节点,无加密传输,无静态加密,无Redis Auth和多可用区。 我
我是一名优秀的程序员,十分优秀!