This site is no longer updated.Go to new Conversational Cloud docs

Test files


.xml are automatic test files written in the XML language.

Tests have the following structure:

<test>
    <test-case>
        <q>User request</q>
        <a>Bot response</a>
    </test-case>

    <test-case>
        <q>User request</q>
        <a>Bot response</a>
    </test-case>
</test>

In most cases, tests are step-by-step descriptions of a conversation between a user and a bot where expected responses of the bot are specified.

Test cases are specified within the <test>...</test> root tag. Each test case describes a new session and a new client, so the $session and $client variables are reset before each test.

Learn more about script testing

Please note that symbols like \& must be escaped in xml.


Including tests

Any tests located in the test folder run automatically when you deploy your bot. You can override this behavior in the chatbot.yaml file in the tests section.

The tests section can contain two subsections, include and exclude, each of them being the list of ant templates with file names.

  • include — only the tests from the files that match the templates listed in this section will be executed.
  • exclude — all the files matching the templates listed in this section will be excluded from execution.

For example:

tests:
  include:
    - tests.xml
    - delivery.xml
    - order.xml
    - cart.xml
    - otherCities.xml
    - sauces.xml
  exclude:
    - time.xml