Test Chat Tool

The Chat menu tab consists of the Test Chat tool and the Test Cases panel. It is also from this menu tab that you can view the 5 most recent log and error reports of a botlet. If you need to look up a larger list of logs and error reports of a botlet, click the Log menu tab to access them. For more details about accessing the full list of log and error reports listed in the Logs menu tab, see: Logs.

This document describes how to use the Test Chat tool, and how to create, run, edit, and delete a test case from a botlet.

What is the Test Chat Tool?

The Test Chat tool is a runtime channel used for executing a botlet’s functionality in the Workspace. This test tool enables developers to determine if the responses of a botlet are working properly. As a best practice, use the Test Chat tool on a botlet before publishing it to a group of designated users or to a channel such as the Store or Cortana.

To access the Test Chat tool and execute a botlet’s functionality, refer to the steps below.

  1. In the Workspace Items Tree, select a botlet associated with an organization.
  2. In the Control Panel, click the Chat menu tab.
  3. Click Start new session.

Note: To send a message, enter some text in the text field, and then press Enter.

alternate text

Clearing Chat History

The steps below describe how to clear the chat history of a botlet.

  1. In the Chat Home window, click the ellipsis button (…).
alternate text
  1. Click Clear chat history.
alternate text

Note: When a botlet’s chat history is cleared, the message text that was entered inside the text field is deleted and the Start new session button reappears inside the Chat Home window.

Viewing Message Raw JSON Details

If you want to review or send the details of the message raw JSON to a botlet, refer to the steps below.

  1. In the Chat Home window, scroll over the text message bubble, and then click raw JSON.
alternate text
  1. To test modifications made to the raw JSON output (e.g., “text”: “/start” to “/Hi!”), click Send raw JSON. Refer to the following before and after images as an example of these changes made to the raw JSON output.
alternate text

Before Raw JSON Changes

alternate text

After Raw JSON Changes

alternate text

Result of Sending Raw JSON Changes

alternate text
  1. (Optional) Click the ellipsis, and then select Save as a test case.
alternate text

Note: This optional step will save your chat message as a test case that you can review and run again. For more information about creating, running, editing, and deleting a test case, refer below to the Test Cases Panel section.

Test Cases Panel

The Test Cases panel enables developers to create, run, edit, and delete test cases on a botlet.

Creating a Test Case

To create a test case on a botlet, refer to the steps below.

  1. In the Chat Home window, click the Test case panel, and then click +.
alternate text
  1. Enter a Test Case Name in the text field, and then click Create.
alternate text

Example Test Case

alternate text

Running a Test Case

To run a test case on a botlet, refer to the steps below.

  1. In the Chat Home window, click the Test case panel.
  2. To run a specific test case, click the drop-down arrow in the Select a test case… field, and then select a test case that is available in the list.
alternate text
  1. Click Run to execute the test case.
alternate text

When a test case successfully runs, the Type, Message, and Status columns display the following details.

alternate text

Type

INPUT – This indicates messages sent to the botlet. EXPECT – This indicates responses from the botlet.

Message

The message column displays test case grammar examples (i.e., INPUT “/start”, INPUT “Hi!”). In addition, this column will display the EXPECT results.

Status

The status column displays the number of milliseconds it took for the INPUT message to get to the botlet. It also displays the number of milliseconds it took for the EXPECT response it received from the botlet.

Editing a Test Case

The steps below describe how to edit a test case.

  1. In the Chat Home window, click the Test case panel.
  2. Click the drop-down arrow in the Select a test case… field, and then select a test case in the list.
  3. Click Edit.
alternate text
  1. Modify the botlet’s Semantic Composition Language (SCL) code, and then click Save.
alternate text
  1. Click Run to execute the botlet’s functionality.

Deleting a Test Case

The steps below describe how to delete a test case from a botlet.

  1. In the Chat Home window, click the Test case panel.
  2. Click the drop-down arrow in the Select a test case… field, and then select a test case in the list.
  3. Click Delete.
alternate text
  1. Click Delete to confirm deleting the test case.
alternate text

This concludes the concepts of how to use the Test Chat tool and the Test Cases panel. In this document, you were shown how to determine if the responses of a botlet are working properly. You were also shown how to create, run, edit, and delete a test case from a botlet.