我最近更新了我的测试项目中的依赖项。更新后,botium-core 无法加载我定义的自定义断言器。
这是一个 package.json 的片段,它显示了我的依赖项。
"dependencies": {
"botium-connector-dialogflow": "^0.0.25",
"botium-core": "^1.11.0",
"jsonpath": "^1.1.0",
"lodash": "^4.17.20",
"minimist": "^1.2.5",
"mocha": "^8.2.1"}
这是 botium.json 的片段
{
"botium": {
"Capabilities": {
"PROJECTNAME": "my-project",
"CONTAINERMODE": "dialogflow",
"DIALOGFLOW_PROJECT_ID": "<google project id>",
"DIALOGFLOW_CLIENT_EMAIL": "<service credentials email>",
"DIALOGFLOW_PRIVATE_KEY": "<service credentials private key>",
"ASSERTERS": [
{
"ref": "ASSERTER1",
"src": "./src/asserter1.js"
}
]
},
"Sources": {},
"Envs": {}
}
我还将路径切换到 .\src\asserter1.js,它可以在我的 Windows 机器上运行,但在 linux 构建环境中失败。