如何使用botium绑定更改Botium测试的测试套件名称。 Currenlty这是默认名称

时间:2019-04-05 12:07:14

标签: automation chatbot

我正在将Both绑定与Mocha测试运行程序和Mochawesome记者一起使用。我想更改mochaawesome报告中的默认测试套件名称。

我尝试通过下面的commna修改botium.spec文件  努力工作

我试图在botium.json文件的envs中设置测试套件名称。没有工作

1)botium.spec.js

 const bb = require('botium-bindings')
    bb.helper.mocha().setupMochaTestSuite('Demo Test suite')

2)botium.json

{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "Test chatbot",
      "CONTAINERMODE": "watson",
      "WATSON_APIKEY" : "xxx",
      "WATSON_WORKSPACE_ID": "xxx",
      "WATSON_URL" : "https://gateway-lon.watsonplatform.net/assistant/api",
      "WATSON_COPY_WORKSPACE" : true
    },
    "Sources": {},
    "Envs": {
      "BOTIUM_TESTSUITENAME" : "Demo Test suite"
    }
  }
}

3)package.json

{
  "name": "Botium_Test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "mocha --reporter mochawesome --reporter-options \"code=false,reportTitle=Digital CityCool,inline=true,overwrite=false\"  --exit spec",
    "mocha": "mocha spec"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "botium-bindings": "^2.0.10",
    "botium-connector-echo": "latest",
    "botium-connector-watson": "0.0.5",
    "mocha": "latest",
    "mochawesome": "^3.1.1"
  },
  "botium": {
    "convodirs": [
      "spec\\convo"
    ],
    "expandConvos": true,
    "expandUtterancesToConvos": false
  }
}

mocha报告测试套件名称为“ Botium_Test的Botium测试套件”  我想要botium.json文件中定义的测试套件名称

1 个答案:

答案 0 :(得分:0)

您的1号审判非常接近。在botium.spec.js中使用它:

conda --version