赛普拉斯:在柏树中运行不同的文件

发布于 2025-02-11 05:52:17 字数 431 浏览 0 评论 0原文

我有一个项目,我已经实施了Cucumber Framework。但是,当我运行Hubactivity1.feature文件时,它将使用Projectprofile.spec.js而不是Hubactivity1.spec.js

我不知道为什么会发生这种情况。如果有人有任何想法,请让我知道。也许这是我任何地方的错误。请建议我。

请查看下图的图片,了解我的测试中正在发生的情况。

I have one project where I have implemented the cucumber framework. but when I run the HubActivity1.feature file it will be using ProjectProfile.spec.js instead of HubActivity1.spec.js.

I don't know why this happening. please let me know if anyone has any ideas. Maybe it's my mistake anywhere. Please suggest me.

Please check out the below image of what is happening in my test.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ゝ杯具 2025-02-18 05:52:17

请检查您对黄瓜的配置是否正确:

  1. 检查是否在cypress.config.ts上,您的SpecPattern路径指定为:例如:

speppattern:'Cypress/e2e/**/*。 {功能,功能}'

,并且使用相同的文件以正确的方式导入:

  setupNodeEvents(on, config) {
      const options = {
        ...browserify.defaultOptions,
        typescript: require.resolve('typescript'),
      };
      on('file:preprocessor', cucumber(options));
    },
  1. 检查是否已在nonglobalstepbasedaseir中指定了在文件包中的步骤定义中的正确路径配置。JSON:

    “ Cypress-Cucumber-Preprocessor”:{“ nonglobalstepdefinitions”:true,“ nonglobalstepbasedir”:“ cypress/step_definitions”,“ commonpath”,“ commonpath”,“ commonpath”

Please check if your configuration of cucumber is correct:

  1. Check if on your cypress.config.ts you have the specPattern path specified for example:

specPattern: 'cypress/e2e/**/*.{feature,features}'

and you import in correct way plugin with the same file:

  setupNodeEvents(on, config) {
      const options = {
        ...browserify.defaultOptions,
        typescript: require.resolve('typescript'),
      };
      on('file:preprocessor', cucumber(options));
    },
  1. Check if you have specified the correct path configuration in nonGlobalStepBaseDir to your step definition in the file package.json:

    "cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": true, "nonGlobalStepBaseDir": "cypress/step_definitions", "commonPath": "./common" },

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文