actions-on-google / actions-on-google-testing-nodejs

Apache License 2.0
75 stars 18 forks source link

Library Alpha Discussion: Add an interactive prompt? #9

Closed Fleker closed 5 years ago

Fleker commented 6 years ago

Hey AoG Devs!

Now that the alpha version of the testing library has been out for a few weeks, we'd like to get feedback on the behavior and API design of the library.

Right now the tests are written as a single set of interactions that are then run programmatically. This is useful for situations where you want a lot of automation, but may not be as helpful when debugging. Would it be useful to have a script that lets you open an interactive session with your action so that you can see the responses at each step of the conversation?

Example:

fleker@fleker:~/actions-on-google-testing$ node interactive.js “number genie”
action: { tts: “I’m thinking of a number between 0 and 100” }
> 50
action: { tts: “You’re warm”, card: { image: “warm.gif” } }
> 49
action: { tts: “You’ve got it”, card: { image: “winner.gif” }}
> cancel
fleker@fleker:~/actions-on-google-testing$ 
yoichiro commented 6 years ago

@Fleker I tried to implement the interactive prompt. I just sent the pull request. The ActionsOnGoogle class is very useful, therefore, I was able to implement the command easily. You can see the screenshot on the pull request. Of course, the specification of the command is my arbitrary idea. If you can't accept the specification and the implementation, you can reject that without hesitation. 😄