Reputation: 2061
I am trying to follow the partial convo instructions here under splitting convos, but I am unable to get the partial convo to actually send messages to the chatbot. Are there additional configuration settings in botium.json
that I need to adjust to enable this feature?
Consider the simple give_me_a_picture.convo.txt
that is created with botium-cli init. If I create a pconvo.txt
file example.pconvo.txt
that looks like this:
PARTIAL_HELLO
#me
Hello, Bot!
#bot
You said: Hello, Bot!
and then I adjust give_me_a_picture.convo.txt
to include the following:
give me picture
INCLUDE PARTIAL_HELLO
#me
give me a picture
#bot
Here is a picture
MEDIA http://www.botium.at/img/logo.png
The above test will technically still pass. However, if I run this with --verbose
you will see that it doesn't actually send the commands from PARTIAL_HELLO
(ie. "Hello, Bot!"
) -- it just skips to saying give me a picture
-- what adjustments do I have to make such that it actually goes through the partial conversation?
Here is the --verbose
output at the start of the convo where you can see the first question is give me a picture
botium-PluginConnectorContainer Botium plugin botium-connector-echo loaded +0ms
botium-connector-echo Validate called +0ms
botium-connector-echo Build called +1ms
botium-connector-echo Start called +0ms
botium-cli-run running testcase give me picture +21ms
botium-Convo give me picture/Line 5: user says {
botium-Convo "sender": "me",
botium-Convo "channel": null,
botium-Convo "messageText": "give me a picture",
botium-Convo "stepTag": "Line 5",
botium-Convo "not": false,
botium-Convo "asserters": [],
botium-Convo "logicHooks": [],
botium-Convo "userInputs": []
botium-Convo } +0ms
I can also confirm that botium did find the partial convo and transcribed it succesfully:
botium-ScriptingProvider undefined PARTIAL_HELLO ({ convoDir: 'sample/', filename: 'example.pconvo.txt' }): Line 3: #me - Hello, Bot! | Line 6: #bot - You said: Hello, Bot! +0ms
Upvotes: 1
Views: 256
Reputation: 1315
You are using the INCLUDE instruction in the header of the convo file, which is the wrong place - you have to use it within the actual conversation. To use the partial convo at the beginning of the convo, add it in the #begin section:
give me picture
#begin
INCLUDE PARTIAL_HELLO
#me
give me a picture
#bot
Here is a picture
MEDIA http://www.botium.at/img/logo.png
Upvotes: 1