简体   繁体   English

cypress cucumber 中的 .feature 文件,由于插件崩溃而停止运行测试

[英].feature file in cypress cucumber , stopped running tests because a plugin crashed

I am trying to run a.feature file in cypress cucumber. but when i run the file, getting this error.我正在尝试在 cypress cucumber 中运行 a.feature 文件。但是当我运行该文件时,出现此错误。

TypeError: Cannot destructure property 'name' of '(intermediate value).parse(...).feature' as it is undefined. TypeError: 无法解构“(中间值).parse(...).feature”的属性“name”,因为它未定义。

following is my index.js以下是我的 index.js

/// <reference types="cypress" />

/**
 * @type {Cypress.PluginConfig}
 */ 

const cucumber = require('cypress-cucumber-preprocessor').default

module.exports = (on, config) => {

  on('file:preprocessor', cucumber())

}

Can anyone please tell me what am i doing wrong?is谁能告诉我我做错了什么?是

I had the same issue, the problem was there was a feature file without the word "feature" inside.我有同样的问题,问题是有一个功能文件里面没有“功能”这个词。 I was not using that file because it was commented but cypress ask me for that word.我没有使用那个文件,因为它被评论了,但赛普拉斯问我这个词。

Change in your file.feature Scenario: for Scenario Outline: and run更改您的 file.feature Scenario:对于Scenario Outline:并运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM