Writing Rasa chatbot test stories with buttons - testing

I have a Rasa chatbot (Version 3.3.0) where i want to write test stories. Unfortunetly it's is not documented, how to test a button click.
For example, i have created an utterance like this:
utter_choose_food:
- text: pizza or burger
buttons:
- title: pizza
payload: /order{{"food":,"pizza"}}
- title: burger
payload: /order{{"food":,"burger"}}
I tested to write a user-step with title, but this make predictions for other intents then order. Using the payload gets me nowhere either.
How to write a test story for this scenario?

Thanks for the support :/
I figured it out myself and add a pull request for the rasa documentation:
https://github.com/RasaHQ/rasa/pull/11766

Related

How to get playing radio station url using sonos API

We are using Sonos API for controlling Sonos. We need to play a radio station on a speaker.we are using playbackMetadata API for getting the information about the radio station and we get a response as below
{
"container" : {
"type" : "station",
"service" : {
"id" : "254",
"name" : "TuneIn"
},
"name" : "Radio Bern1",
"id" : {
"accountId" : "sn_0",
"objectId" : "s15452",
"serviceId" : "254"
}
}
}
we need to play this radio station again after a doorbell is played in the same speaker. for that, we need the URL of the radio station to play using loadAudioClip API in Sonos document. Is there any other API that we can use?
Am I correct in understanding that you are trying to resume the existing music on a device after a doorbell sound is played?
If so, then the best way to accomplish this is to use the loadAudioClip API for the doorbell sound: https://developer.sonos.com/reference/control-api/audioclip/loadaudioclip/
A solution using the loadAudioClip API would work like this:
An audio stream is playing on a Sonos speaker (in your example, a TuneIn radio station)
A doorbell press triggers a loadAudioClip API call, which plays a doorbell sound (from a provided stream URL) on the Sonos speaker
When the audio clip is finished playing, the original stream (a TuneIn station in this example) will automatically resume playing.
In summary, you want to use loadAudioClip for the doorbell sound, and it will automatically resume any music stream that was already playing.
Please let me know if this doesn't solve your problem.
Thanks!
-Mark
There is no way to get a direct stream link to a playlist item. You have two options to solve this issue using the loadAudioClip API: https://developer.sonos.com/reference/control-api/audioclip/loadaudioclip/
Option 1 - utilize the default CHIME sound that is available as part of the loadAudioClip API. After the CHIME plays, any music that was playing before will resume. Using this default sound is documented in the link provided above.
Option 2 - if you want to play a specific, custom sound clip, you will need to provide your own streamUrl to this sound clip. An example of this is also provided in the documentation link above.
I would suggest starting with Option 1 above to get your application working with the default CHIME clip. If you have a need to use a custom sound, move on to option 2 once you have your custom audio clip available via a streamUrl.
Hope that helps!
Thanks,
Mark
I'm not sure it the cloud api also supports actual urls, but in my sonos library we are generating the TuneIn url with only the information you've provided.
x-sonosapi-stream:{container.id.objectId}?sid={contianer.id.serviceId}&flags=8224&sn=0
or with your data:
x-sonosapi-stream:s15452?sid=254&flags=8224&sn=0

How do I find my app's product_id for use with App Annie's API?

I am trying to make calls to App Annie's connect API. The product_id is required with every request, but I can't find it anywhere on App Annie. I have looked under "My Apps" and "App Data Details."
Sample API call for reference:
https://api.appannie.com/v1.2/intelligence/{vertical}/{market}/app/{product_id}/history?countries={country}&feeds={feeds}&device={device}&granularity={granularity}&start_date={start_date}&end_date={end_date}
Another sample with {} filled in
https://api.appannie.com/v1.2/intelligence/apps/ios/app/338137227/history?countries=US&feeds=downloads&device=all&granularity=daily&start_date=2016-02-01&end_date=2016-02-02
One way to find it - in the app details page scroll down to the bottom and you will see it there in very light grey (not so easy to see) - e.g. in this small example image:

Verifying toasts using Appium , and get server reaction to button clicks

i'm new to android automation testing and i recently started to work with Appium.
I use it for android native app automation.
I have 2 question -
is there a way to verify toasts?
the latest posts i saw which referred to this issue are from the mid of 2014
and i wanted to know if there's something new in this subject before i will find another tool to run my tests with (as i understand selendroid can verify toasts).
is there a way to catch the http request which my app sends to the server when i'm pressing a button, during the automatic test?
something like a listener which works in the backround and wait for clicks?
tnx
To verify toast messages you can use one of image recognition libraries. For ruby I use RTesseract together with image processor RMgick
Idea is simple:
make toast message to appear
take few screenshots
iterate over taken screenshots and look for text
You may play with image processing, to increase recognition quality.
Here you can find code snippet which I use in my framework: link

Rally SDK 2.0 displaying debug information

I can get simple queries working and displaying using the new 2.0 framework, I want to display some debug type information back to the screen but I am finding the Rally default app is overlaying everything.
App is based on standard i.e.
Ext.define('ReleaseHistory', {
extend: 'Rally.app.App',
componentCls: 'app',
grid: null,
etc...
What is the best way for me to 'dump' information back to the screen using this framework, lets say I have an array of stuff, in the old SDK I can do something like this:
var results = JSON.stringify(dataAddedOrRemoved);
dojo.byId("debug").innerHTML = results;
Usually the easiest way to inspect code or data in an app is through the developer tools provided by your browser. console.log statements can also be useful.
Otherwise, you will probably find the following guide helpful:
https://help.rallydev.com/apps/2.0rc2/doc/#!/guide/add_content
SDK2 is built on top of ExtJS and everything is a component or a container. You will have a bad time directly modifying the DOM without the framework's knowledge. Here is a simple example of how to just add some arbitrary html content to your app body:
this.add({
xtype: 'component',
html: 'content-goes-here'
});

Implementing "Rate application" functionality on a Windows Store app

I am trying to implement rating functionality in a Windows Store application using HTML / Javascript.
I am showing a popup dialog similar to the one below within the application and when "Rate" is clicked I would like to redirect to the Marketplace where the user can then rate the application.
This is a task that can easily be done on Windows Phone 7 via the MarketplaceReviewTask.
Is there an API on Windows 8 that I could call to have this achieved?
The Rate and Review link in the Settings charm will automatically appear for users other than yourself (since you can't rate your own app).
If you want a custom link somewhere, you can use LaunchUriAsync like Jim says, using this URI:
"ms-windows-store:REVIEW?PFN=[my-pfm]"
where my-pfm is "Package Family Name" which you will find in your application manifest.
Here's a blog post I found that's helpful:
http://www.andybeaulieu.com/Default.aspx?tabid=67&EntryID=227
If you use protocol activation (LaunchUriAsync) with the URI format suggested here you'll get to your app's page on the Store; however, there's still an additional step for the user to click Write a Review. There may be a way to deep link to it and I'll update if I find out.