首页 > 解决方案 > 如果我使用 Cypress-cucumber 对两个不同的示例使用两个不同的标签,会出现错误?

问题描述

我在 cypress 中有一个功能文件和步骤定义文件。

我的功能如下所示:

Scenario Outline:
Given when I go the page
When I login
Then Do some test

@test1
Examples:
|email|
|test@gmail.com|


@test2
Examples:
|email|
|test@gmail.com|

我用这个命令运行:npx cypress-tags run -e TAGS="test1"

但我收到以下错误:

但是,如果我有这样的场景,我会使用我使用的命令获得预期的结果。

@test1
Scenario Outline:
Given when I go the page
When I login
Then Do some test

Examples:
|email|
|test@gmail.com|
|email|
|test@gmail.com|

有什么方法可以根据示例中的标签运行吗?

标签: javascriptcucumbercypresscypress-cucumber-preprocessor

解决方案


推荐阅读