1

以下 cypress 命令在 Mac 中有效:-

npx cypress-tags run -e TAGS='@TC1' npx cypress-tags run -e TAGS='@TV1 or @TC2'

但对于 Windows 10,上述方法不起作用。我必须删除引号才能使其正常工作。npx cypress-tags 运行 -e TAGS=@TC1

但是现在删除引号后,我将无法传递多个标签。我已经尝试了以下所有方法,但到目前为止,Windows 10 中的多个标签都没有任何效果。

为 Windows 10 尝试的分辨率:-

npx cypress-tags run -e TAGS='"@TC1 or @TC2"' // 在 Windows 10 中不起作用

npx cypress-tags run -e TAGS=^'"@TC1 or @TC2"' // 在 Windows 10 中不起作用

npx cypress-tags run -e TAGS=^'"”@TV1 or @TC2"”' // 在 Windows 10 中不工作

npx cypress-tags run -e TAGS='"@TC1 or @TC2"' // 在 Windows 10 中不起作用

让我知道是否有人有办法让它工作

4

1 回答 1

1

我正在使用cypress-cucumber-preprocessor的内置标记功能,这对我在 windows cmd 上的调用很有效

yarn cypress run -e TAGS="@smoke or @final"

我在我的情况下使用纱线。但它应该与npx相同。

于 2021-05-28T06:11:43.643 回答