codeforequity-at / botium-core

The Selenium for Chatbots - Bots Testing Bots
https://www.botium.ai
MIT License
229 stars 64 forks source link

Extend Dialogflow connector to support context/session/language #80

Closed raniachaibi closed 6 years ago

raniachaibi commented 6 years ago

I need to test a chatboat application similar to google assistant. When we send request from our botium, we're sending a simple AIRequest object while in the API.API library we can set multiple parameters like the Context, Lang, Session etc... is that something that we can do with Botium ?

codeforequity-at commented 6 years ago

Currently, this is not possible, but it definitly makes sense and will be included in one of the upcoming builds.

codeforequity-at commented 6 years ago

Botium supports setting context name, lifespan and parameters, there are some capabilities available:

It's currently not documented, but maybe you can see from the code how it works - maybe this is of use for your ?

raniachaibi commented 6 years ago

Should this be integrated in the botium.json file ?

codeforequity-at commented 6 years ago

yes

raniachaibi commented 6 years ago

How can i modify the DIALOGFLOW_INPUT_CONTEXT_LIFESPAN according to what the test requires? in some cases I need to set it to 1 and in other cases i need to set it to other values, so i can not run tests together. Can i modify it at the beginning of each test case for example?

codeforequity-at commented 6 years ago

I know what you mean - I think you would need some ugly hack currently: getting a reference to the container object and modifiying the capability before running a test case. There is clearly room for improvement here, maybe introducing some kind of hook to make such things possible.

As the Dialogflow connector is very cheap to initialize, another option would be to build a new BotDriver for each test case, changing the capability to what you need for the test case.

frankgerhardt commented 6 years ago

Good support for DialogFlow and Google Assistant is the first thing I look for, after Facebook Messenger.

Please update the docs and put a release plan with upcoming features somewhere so that we can see what you will do in the future.

codeforequity-at commented 6 years ago

@frankgerhardt thanks for the feedback. we are currently working on making the development process more transparent and planable. Are there any special features you want to see in Botium ?

frankgerhardt commented 6 years ago

A screencast would certainly be convincing. Just show tests running and walk through the examples. Without a video I have to do this myself only to evaluate it.

arunb0405 commented 6 years ago

Can we manage to pass the Session_Id or a test user_Id and password in one of the dialog flow capabilities, will this be provided as enhancement? I want to test the chatbot for a user session, e.g a user logs in and add item to shopping cart and when bot is queried it lists the items.

codeforequity-at commented 6 years ago

discussion moved to #88