简体   繁体   English

黄瓜javascript-如何自动生成步骤定义文件?

[英]Cucumber javascript - How can I automatically generate the step definitions files?

I'm interested in the question - is there any mechanism to automatically generate the step definitions files based on the feature files? 我对这个问题感兴趣-是否有任何机制可以基于特征文件自动生成步骤定义文件? I found a solution for the .Net - this is plugin for Visual Studio - specflow (see section "Generating Step Definitions") . 我找到了.Net的解决方案-这是Visual Studio的specflow插件(请参见“生成步骤定义”一节)。 Perhaps there is a similar solution for JavaScript or Typescript? 也许对于JavaScript或Typescript也有类似的解决方案?

Just execute the feature file from command prompt. 只需从命令提示符处执行功能文件即可。 The command may look like this: 该命令可能如下所示:
node index.js -s .\\step-definitions -f .\\features\\featurefileName.feature

And you will get the step definition for undefined steps 您将获得未定义步骤的步骤定义

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

相关问题 编写步骤定义时出现问题 - Cucumber & Appium on JavaScript - Problem in writing step definitions - Cucumber & Appium on JavaScript 未定义的步骤定义黄瓜 - Undefined Step Definitions Cucumber JavaScript - NightWatch.js - Cucumber:如何处理步骤定义上的返回值 - JavaScript - NightWatch.js - Cucumber: How To handle returned values on step definitions 如何使用 WebStorm 在 TypeScript 而不是 JavaScript 中创建 Cucumber 步骤定义文件? - How can I use WebStorm to create a Cucumber step definition file in TypeScript instead of JavaScript? 如何记录(jsduck / jsdoc)Cucumber.js步骤定义? - How to document (jsduck/jsdoc) cucumber.js step definitions? 如何自动为Javascript生成良好的访问器? - How can I automatically generate good accessors for Javascript? 为什么Cucumber不执行我的步骤定义? - Why is Cucumber not executing my step definitions? 如何使用JavaScript文件及其测试用例自动生成TypeScript文件? - How to automatically generate TypeScript files using JavaScript files and their test cases? 如何逐步保存Java脚本的进度? (在浏览器中) - How can I step by step save my progress with Javascript? (in a Browser) 如何使用 Cypress io 将特征文件与步骤定义链接起来 - How to link features files with the step definitions using Cypress io
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM