Once you've completed your setup, you can test your Food Ordering experience end-to-end using the Actions console.
Before you begin to test your checkout endpoint, make sure you complete the following prerequisites:
- Set up and test Food Ordering data feeds.
- Update your project's fulfillment endpoint with the checkout fulfillment endpoint you implemented in set up checkout.
- Set up and test sandbox payments.
- Set up and test submit orders and order updates.
You can complete end-to-end testing with the Actions console using either an automated testing method or a manual test, using your validated data feed. If possible, use the automated testing method for faster results and testing coverage.
Test with the automated test tool
The Actions console provides a set of automated tests you can run against your web service to test end-to-end functionality. This testing method can save you time by automating the testing process and providing a repeatable test set.
To test your project end-to-end, follow these steps:
- Go to Test > Integrations.
- For Data feed, select Preview.
- For Fulfillment endpoint, enter the fulfillment endpoint URL you want to test against.
- In Advanced settings, select the test cases for your integration test to run. For now, focus on the Checkout > Eligible cart - items without options and SubmitOrder > Eligible cart test cases.
- Click Run.
- Wait for the test to complete. This can take up to 20 minutes depending on the number of entities and test cases selected.
Review the results of your integration test to make sure your feed and fulfillment work as expected (success rate of at least 95%). For test cases with a low success rate, you can get more information about associated error messages by clicking on the test case.
See more information about the automated integration test tool.
Test manually with data feed
You can test your end-to-end functionality using a valid data feed for your Food Ordering service. This testing process uses the data feed preview mode to walk through the end-to-end process.
To test manually, follow these steps:
- Go to Develop > Data feeds in the Actions console.
- On the Test your app with feeds card, click Get started.
- Select Preview as the data feed environment from the dropdown.
- Click Launch Test to preview your feed.
- Go through the Food Ordering flow and build a cart.
- Test your checkout endpoint by clicking the Checkout button.
Test your submit order endpoint by clicking the Place order button.
If the order successfully submits, the preview displays a confirmation page containing your order details.
Click the confirmation dialog to view order details. Append
sandbox=1if you see HTTP 404 errors.
Push an order update for the newly created order.
Refresh your page to see updates to the order details.
Once you're done testing, follow these steps to turn off the testing mode:
- Go to Test > Simulator.
Click the Test on device button:
You've completed the steps to preview your Food Ordering web service. To take advantage of the additional features that Food Ordering provides and to productionize your web service, please complete the Merchant interest form. You will be contacted after submitting the form.
In addition to the steps outlined above, you can use console tools to further test and troubleshoot your order fulfillment.
Refer to the following tools for additional guidance:
- The Chrome DevTool Console outputs request and response JSON between the console and your fulfillment. Refer to this output while performing a manual test to troubleshoot specific issues.
- Your fulfillment outputs its Stackdriver logs to the Google Cloud console. If you're troubleshooting issues with your fulfillment code, refer to these logs for detailed error messages.