A Test User is a simulated user created to test scenarios with the GenerativeAgent Previewer.

These users help you mimic API interactions, allowing you to assess how tasks and functions behave in various conditions without requiring calls to real API endpoints.

By using Test Users, you can ensure that GenerativeAgent handles key workflows, edge cases, and potential issues effectively.

Test Users allow you to define replies for different API calling scenarios (e.g., the return for an API Call named getAddress but having different user IDs).

Use Test Users to test:

  • Key happy-flows
  • Edge cases
  • Common problems or issues

Create a Test User

To create a Test User:

  1. Navigate to the Test User page in GenerativeAgent and click “Create User”.
  2. Provide the following information:
    • Name of the test user
    • Purpose of the test user (optional) to describe what situations this test user should be used (e.g. Tests layovers greater than 4 hours).
  3. You can choose to manually mock data or to auto-generate mock data by describing a test scenario.
    • To auto-generate, enable the scenario toggle and describe the scenario for the test user.

    Autogenerating a test user may take up to one minute to complete. You can close the scenario dialog while the test user is being generated.

Configure and Modify Test User Data

After creating a Test User, ensure that your mock data aligns with your testing needs.

  • Auto-Generated Data: Review the generated functions and mock data. If needed, click the “Regenerate” button to update the mocked data based on a revised scenario.
  • Manually Created Data: Add functions and manually mock data by using the ”+ Add function” button. Ensure that each function accurately reflects the scenario you want to test.

For each function, provide the mocked request and response in JSON.

Add Variants to Mocked Data

Adding variants allows for different responses to be returned for different request parameters within the same function. For example, you may want different data returned for different confirmation codes, like below.

To add an additional variant to a function:

  1. Click ”+ Add variants” at the bottom of the function.
  2. Define new request parameters and corresponding response data.
  3. Save to include the variant in your test user setup.

Use Test Users in the Previewer

Once you have saved your test user, you are now ready to simulate a conversation with GenerativeAgent in the Previewer.

Was this page helpful?