Test activity charges for using botium to test IBM Watson

I’m currently assessing the usage of botium in our organization, mainly for testing IBM Watson based bots. One thing I learnt is IBM watson is User-based plans , meaning how I represent that user in the API call impacts how the interactions are billed.

To run scripted regression test, we’d better use a single user_id for all of the calls within your regression test. Otherwise, watson will charge us via “session_id”.

So may I know how botium works when interacting with IBM watson? Thanks a lot for your help in advance.


According to the IBM documentation the user_id is considered as a context variable.

The Botium Watson Connector allows to set custom context variables with the UPDATE_CUSTOM logic hook. You can use it like this in the #begin section of a test case:

UPDATE_CUSTOM SET_WATSON_CONTEXT|global.system.user_id|botium

Usually there are more than one test case, and it makes sense to make this a global logic hook so that it is used for all Watson API calls throughout your test suite. In Botium Core, this looks like this:

  "botium": {
    "Capabilities": {
      "LOGIC_HOOKS": [
          "ref": "SET_WATSON_USERID",
          "src": "UpdateCustomLogicHook",
          "global": true,
          "args": {
            "name": "SET_WATSON_CONTEXT",
            "arg": "global.system.user_id",
            "value": "botium"

In Botium Box the configuration would look like this:

We already have it in our backlog to make this more convenient, as we received this request a couple of times since IBM is offering this plan.

Hope it helps.

Hi Florian,

thanks a lot for your swift support. It does help a lot.

1 Like