codeforequity-at / botium-bindings

The Selenium for Chatbots
http://www.botium.at
MIT License
108 stars 33 forks source link

npm test in fbdirect does not work as expected #81

Closed juananpe closed 6 years ago

juananpe commented 6 years ago

I have been able to run a conversation with PonchoBot (https://www.messenger.com/t/788720331154519) inside the emulator (running from fbdirect folder). It worked as expected. Now I want to test that conversation. For that aim, I run the following:

$ npm test

But it does not work as expected:

$ npm test

> testmybot-sample-monitoring@1.0.0 test /private/tmp/testmybot/samples/fbdirect
> jasmine

Started
DEPRECATION: done callback received an Error object. Jasmine 3.0 will treat this as a failure
.DEPRECATION: done callback received an Error object. Jasmine 3.0 will treat this as a failure
.
2 specs, 0 failures
Finished in 12.676 seconds

The first DEPRECATION warning is from the included-by-default simplecalc.convo.txt conversation. The second one if from my own conversation (the one recorded with the emulator).

It always answers with two green dots (0 failures) but I'm quite sure that the bot can't answer the expected text because:

What am I doing wrong? Thanks.

Bonus: when I have more than one convos, can I choose which test do I want to execute? I tried this: $ npm test initialconv to no avail (I have that test here: ./spec/convo/initialconv.convo.txt)

codeforequity-at commented 6 years ago

OK, I see that the sample might be outdated, Jasmine is not acting as expected. To find the source of the problem, it would be most easy to just enable debug logging, you will get some hints then ("export DEBUG=botium*").

As for the feature request, please add it to the Botium project, as this could be a very nice Botium feature I think.

codeforequity-at commented 6 years ago

Enhanced with build 1.4.3