Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试找到如何使用特定分组运行 TestCafe 工具脚本的最佳方法 - 烟雾、回归等?cmd的正确语法是什么?我们有带有夹具的脚本,并考虑将其用于分组。我需要找出答案是它是可能的,什么是正确的 cmd。感谢您的回复,亚历克斯
为了运行夹具/测试的子集(即“烟雾”),您现在可以使用.meta({key: 'value', key2: 'value2'})夹具和测试对象的选项。
.meta({key: 'value', key2: 'value2'})
例子:
test .meta({smoke: true, feature: true})
或者
fixture .meta('crud': 'read'})
然后,从命令行运行时,现在通过--test-meta key=value或--fixture-meta key=value选项,如此处所述
--test-meta key=value
--fixture-meta key=value
再次在增强文档中
请使用“ fixture ”进行分组测试。要过滤运行夹具,请使用以下选项:
-F 或--fixture-grep模式
-t 或--test名称
-f 或--fixture名称