End-to-end tests are a powerful way to help you ship your WooCommerce Extension free of defects, but they’re hard to set up initially. As a result, many extension developers never experience the benefits of end-to-end testing and spend more time on bugs they shipped to production.
Today, we’re shipping an End-to-End Testing Boilerplate to help you get started with end-to-end testing for your extension(s). We hope that this will make it much easier for you to add end-to-end tests to your projects, and in turn reduce the headaches experienced from bugs in shipped releases.
The prerequisite software for E2E testing is
- WooCommerce E2E Environment – This package consists of a basic Docker container and scripts for running tests.
- WooCommerce E2E Utils – This package includes a variety of functions to simplify writing tests.
- Jest – A npm package for running tests.
- WooCommerce Core E2E Tests – This package contains the tests that run against changes to WooCommerce core.
- WooCommerce API – This is a utility package for accessing the WooCommerce REST API.
We want the E2E packages to be a valuable resource to the developer community and would love to have feedback from folks who implement end-to-end testing.
Thanks to @achyuthajoy who developed the boilerplate.