有没有人设法让Botium与Cucumber for Java一起工作?

时间:2019-05-03 14:01:13

标签: selenium-webdriver bdd chatbot cucumber-java

我已经尽力让Botium与BDD一起使用,所以我可以看看它是否有用,但我遇到的唯一BDD示例是这个https://github.com/codeforequity-at/botium-bdd-samples/ 但是我无法使用NPM install来安装依赖项,所以我想知道是否有可能让Botium在intellij上与Java的黄瓜配合使用?

我尝试使用js示例安装botium,但是NPM仍然会导致错误

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\sahmed248\\IdeaProjects\\botium-bdd-samples\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\sahmed248\\IdeaProjects\\botium-bdd-samples\\node_modules\\grpc\\src\\node\\extension_binary\\node-v64-win32-x64-unknown"
gyp ERR! cwd C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sahmed248\\IdeaProjects\\botium-bdd-samples\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\sahmed248\IdeaProjects\botium-bdd-samples\node_modules\grpc
node-pre-gyp ERR! node -v v10.15.3
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok

如果有人可以帮助我解决NPM问题,或者说明如何将Botium与Cucumber一起用于Java,那将是有帮助的。

1 个答案:

答案 0 :(得分:0)

Botium Core是一个Node.js库,因此将它与Java配合使用很棘手,但并非并非不可能:Botium支持一种特殊的“网格模式”,它在后台运行并公开一个HTTP / JSON接口-参见{{ 3}}。

对于您的安装问题,以下是一些您可以尝试的提示-显然,node-gyp软件包失败: *删除node_modules文件夹和package-lock.json文件,然后再次运行npm install *以管理员权限运行“ npm install -g node-gyp” *以管理员权限运行“ npm install -g Windows-build-tools”

(请参阅here