Automated integration test

An automated integration test runs a series of test conditions against your fulfillment endpoint. The test results show the success rate and specific test cases that require troubleshooting.

Each test case handles up to 250 entities, and you must run only one test at a time. Wait until the test is complete before you start another.

Prerequisites

Before you begin to test your fulfillment endpoint, you must complete the following prerequisites:

  1. Create and host your Ordering End-to-End data feed.
  2. Implement the Checkout action and Submit Order action in your fulfillment endpoint.

Test with the Automated Testing Tool

The Actions Center provides a tool that sends a number of Checkout and Submit Order requests to your fulfillment endpoint. This automated testing process saves you time and provides a repeatable test set that includes happy path and edge case scenarios.

To test using the automated testing tool, follow these steps:

  1. From the main navigation, go to Inventory > Integration Testing.
  2. Click New test.
  3. In the Data feed drop-down list, select the feed that you want to test. A feed must be ingested already in order to run a test on it.
    • Sandbox: The inventory from your Sandbox data feeds.
    • Production: The inventory from your Production data feeds.
  4. In the Fulfillment endpoint field, enter the URL for your fulfillment endpoint.
  5. In Test Cases, select the Checkout and Submit Order test cases to run.
  6. To start the test, click Run.

Automated test runs can take up to 20 minutes to complete, which is dependent on the number of entities and test cases selected. To see the progress of the test, refresh the page.

Review the results to ensure that your feed and fulfillment work as expected. The success rate needs to be at least 95% for every test case. You can click on the test case to get more information about associated failures.

Integration test cases

For each test case, the console reads your data feeds to generate Checkout and SubmitOrder requests to your endpoint that check your cart validation, order creation, and error handling implementations.

For Checkout, the integration test runs the following test scenarios:

Checkout test scenarios
Eligible cart - items without options The test checks out an eligible cart that has simple menu items.
Eligible cart - items with options Checks out an eligible cart that has complex menu item customizations.
Delivery address is out of range Attempts to check out a cart that has a delivery address outside of the service area.
Minimum order value is not met Attempts to check out a cart that doesn't meet the minimum order value.
Restaurant is closed Attempts to check out a cart when the restaurant is closed.
Unavailable items Attempts to check out a cart that has unavailable items, such as lunch specials.
Unavailable items - min order value not met Attempts to check out a cart that has unavailable items, such as lunch specials, and other valid items that don't meet the minimum order value.
Outdated item prices Attempts to check out a cart that has artificially modified item prices.
Outdated item prices - min order value not met Attempts to check out a cart that has artificially modified item prices and the cart's actual value doesn't meet the minimum order value.
Outdated option prices Attempts to check out a cart that has artificially modified option prices.
Outdated option prices - min order value not met Attempts to check out a cart that has artificially modified option prices and the cart's actual value doesn't meet the minimum order value.
Invalid promo code sent in checkout Attempts to check out with an invalid promo code.
Invalid authentication token This scenario tests the behavior of the integration when it receives an invalid authentication token. The fulfillment API should reject the checkout request.
Eligible cart - with eligible promotion id This test will be executed exclusively for restaurants with qualifying promotions, and the correct discount item is anticipated in the cart.

For SubmitOrder, the integration test runs the following test scenarios:

SubmitOrder test scenarios
Eligible cart The test submits an order that has an eligible cart.
Payment declined Attempts to submit an order that has an invalid payment token.
Ineligible user Attempts to submit an order that has incomplete user information.