【发布时间】:2021-09-24 06:58:38
【问题描述】:
版本
- 赛普拉斯版本:8.4.0
- 预处理器版本:4.2.0
- 节点版本:12.18.2
大家好,如果这是一个愚蠢的问题,我深表歉意,我是柏树的新手/菜鸟,更不用说柏树 + 黄瓜了。
所以我用 cucumber 编写了一些自动化测试,它们运行良好。我在集成文件夹中有功能文件,在集成文件夹中也有步骤定义文件夹。现在我正在尝试构建一些结构,其中在集成下我有一个名为 step_definitions 的文件夹(将在屏幕截图中显示得更好)。
在 package.json 我放了以下内容:
"cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": true, "nonGlobalStepBaseDir": "step_definitions", "commonPath": "common", "stepDefinitions": "step_definitions" }
当我尝试运行测试时,出现以下错误:
Error: We've tried to resolve your step definitions at step_definitions, but that doesn't seem to exist. As of version 2.0.0 it's required to set step_definitions in your cypress-cucumber-preprocessor configuration. Look for nonGlobalStepDefinitions and add stepDefinitions right next to it. It should match your cypress configuration has set for integrationFolder. We no longer rely on getting information from that file as it was unreliable and problematic across Linux/MacOS/Windows especially since the config file could have been passed as an argument to cypress.
任何指针表示赞赏:)
【问题讨论】:
标签: cypress cypress-cucumber-preprocessor