Currently I am trying to find an issue in our real bot. For that I set up a plain sample bot in Azure Web App and wanted to see the "normal" behaviour of Botium. Unfortunately there seems to be an issue. Botium is checking the message received second with the first assert - which does not make much sense to me.
driver.BuildFluent()
.Start()
.UserSaysText('Start')
.WaitBotSaysText((text) => assert('1: You said Start', text))
.UserSaysText('Me no americano')
.WaitBotSaysText((text) => assert('2: You said Me no americano', text))
.Stop()
.Clean()
.Exec()
.then(() => {
console.log('READY')
})
.catch((err) => {
console.log('ERROR: ', err)
})
botium-PluginConnectorContainer Botium plugin botium-connector-directline3 loaded +0ms
botium-connector-directline3 Validate called +0ms
botium-connector-directline3 Build called +0ms
botium-connector-directline3 Start called +2ms
botium-connector-directline3 UserSays called +27ms
botium-connector-directline3 received message { type: 'message',
id: 'EI195KgcTvxFDU8GUXQNjj|0000001',
timestamp: '2018-06-27T13:20:24.5668789Z',
localTimestamp: '2018-06-27T13:20:24.3892858+00:00',
channelId: 'webchat',
from: { id: 'MyEchoBot', name: 'MyEchoBot' },
conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
text: '1: You said Start',
attachments: [],
entities: [],
replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000000' } +1s
botium-connector-directline3 received message { type: 'message',
id: 'EI195KgcTvxFDU8GUXQNjj|0000001',
timestamp: '2018-06-27T13:20:24.5668789Z',
localTimestamp: '2018-06-27T13:20:24.3892858+00:00',
channelId: 'webchat',
from: { id: 'MyEchoBot', name: 'MyEchoBot' },
conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
text: '1: You said Start',
attachments: [],
entities: [],
replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000000' } +96ms
botium-connector-directline3 Posted activity, assigned ID EI195KgcTvxFDU8GUXQNjj|0000000 +206ms
SUCCESS: Got Expected <1: You said Start>
botium-connector-directline3 UserSays called +2ms
botium-connector-directline3 received message { type: 'message',
id: 'EI195KgcTvxFDU8GUXQNjj|0000003',
timestamp: '2018-06-27T13:20:25.767324Z',
localTimestamp: '2018-06-27T13:20:25.751837+00:00',
channelId: 'webchat',
from: { id: 'MyEchoBot', name: 'MyEchoBot' },
conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
text: '2: You said Me no americano',
attachments: [],
entities: [],
replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000002' } +838ms
botium-connector-directline3 received message { type: 'message',
id: 'EI195KgcTvxFDU8GUXQNjj|0000003',
timestamp: '2018-06-27T13:20:25.767324Z',
localTimestamp: '2018-06-27T13:20:25.751837+00:00',
channelId: 'webchat',
from: { id: 'MyEchoBot', name: 'MyEchoBot' },
conversation: { id: 'EI195KgcTvxFDU8GUXQNjj' },
text: '2: You said Me no americano',
attachments: [],
entities: [],
replyToId: 'EI195KgcTvxFDU8GUXQNjj|0000002' } +133ms
botium-connector-directline3 Posted activity, assigned ID EI195KgcTvxFDU8GUXQNjj|0000002 +224ms
ERROR: Expected <2: You said Me no americano>, got <1: You said Start>
botium-connector-directline3 Stop called +1ms
botium-connector-directline3 Clean called +1ms
READY
It seems Botium is sending and receiving the messages correctly, but the assertion is kind of weird. The assert is not performed on the messages it was intended to do:
ERROR: Expected <2: You said Me no americano>, got <1: You said Start>