These asserters check for media content (images, videos) in the bot's response. They can be used without parameters and will fail if no media is found.
Media Attachment
Imagine a chatbot that takes orders for pizza delivery. It has a well-defined inventory of possible pizza sizes and toppings. The user interface should visualize the different sizes using pictures:
User: please send me two salami pizzas
Bot: Please select the size of the pizza
- kids_pizza.png
- normal_pizza.png
- family_pizza.png
The MEDIA asserter (arguments: media URI to look out for), used in the bot response,
will assert that media files are attached in the response.
Media Attachment Count
This asserter will validate the number of media content items.
You can use number comparisons or a specific number for equality:
- MEDIA_COUNT 2
- MEDIA_COUNT =2
- MEDIA_COUNT >2
- MEDIA_COUNT <=3
Media Attachment Nested Count
This asserter will validate the total number of media content items, including those nested within other content.
You can use number comparisons or a specific number for equality:
- MEDIA_COUNT 2
- MEDIA_COUNT =2
- MEDIA_COUNT >2
- MEDIA_COUNT <=3