问题描述
我正在尝试在 Visual Studio 代码中调试 Cucumber 方案,下面是 launch.json 配置。执行不会在断点处停止。我不确定我提到的通用功能路径是否正确。我的 launch.json 需要更改吗?我已经从类似的堆栈溢出帖子中更新了 Outfiles 名称值对。
{
"name": "WebdriverIO Test","type": "node","request": "launch","args": ["wdio.conf.js","--spec","${file}","${workspaceRoot}/test/features/**/*.feature","--tags","${workspaceRoot}/test/stepdeFinition/**/*"],"cwd": "${workspaceFolder}","autoAttachChildProcesses": true,"program": "${workspaceRoot}/node_modules/cucumber/bin/cucumber-js","outFiles": [
"${workspaceRoot}/test/features/**/*.feature"
],"console": "integratedTerminal","skipFiles": [
"${workspaceFolder}/node_modules/**/*.js","${workspaceFolder}/lib/**/*.js","<node_internals>/**/*.js"
]
},
下面是文件夹结构的截图
解决方法
我只是在 VSCode 中使用 Conversion failed when converting date and/or time from character string.
来调试我的 webdriverio-cucumber 测试。它非常简单,通常不需要额外的配置步骤。到目前为止,我发现它非常方便和有用。您会找到更多信息 here。希望这会有所帮助。