<a>
Description
Tests:
- The existence of a bot response.
- The response text.
- The state in which the response was generated.
- The state which started script execution.
For each bot reply a
, the <a>
tag is required in tests.
Attributes
class
is a state which started the script for the current request, an optional attribute.state
is a state in which the response was generated, an optional attribute.
Body
The text of the expected response, optional.
Examples
<a></a>
<a>Response text</a>
Instead of a text response, in <a>
, you can specify the state to which the system goes. For that, use the class
and state
attributes.
The class
attribute indicates the state to which the user’s request was classified. The state
attribute indicates the state from which the response was received. For example:
<test>
<test-case>
<q>What’s up?</q>
<a state="/Offtopic/HowAreYou"/>
</test-case>
</test>
If you need to check that the system first gets into one state, and then with the help of the go!
tag goes to another state, you can use class
as an attribute that indicates the state into which the system gets first. Then, use state
as an attribute indicating the state into which the system gets further.
If after the first state there is a sequence of transitions, they should also be described using the state
attribute. For example:
<test>
<test-case>
<q>What’s up?</q>
<a class="/Offtopic/HowAreYou"/>
<a state="/Offtopic/Fallback"/>
<a state="/Offtopic/HowCanIHelpYou"/>
</test-case>
</test>
class
and state
can be the same. If one transition per state is tested, it is better to use one of these attributes when testing. Full record:
<test-case>
<q>What’s up?</q>
<a class="/Offtopic/HowAreYou" state="/Offtopic/HowAreYou"/>
</test-case>