Categories
Core Quality

E2E Package Releases

We recently released updates to all of our end-to-end testing packages:

Below you’ll find an overview of what has changed for each of these packages.

@woocommerce/api

This release contained compatibility fixes for the core tests and utilities packages. There were no new features released.

@woocommerce/e2e-core-tests

FLAKY TESTS

There were a few tests that would intermittently fail when run locally in headless mode. We addressed almost all of the known ones with either a small code fix or by using an alternate method to complete an action.

CONFIG DEPENDENCY

In version 0.1.0, if you added this package to your project without the e2e-environment package, it would only work if you had the config dependency in your main package. Version 0.1.1 includes the dependency.

NEW TESTS

We added and updated a number of tests. See @woocommerce/e2e-core-tests for more details.

@woocommerce/e2e-utils

CONFIG DEPENDENCY

In version 0.1.1, if you added this package to your project without the e2e-environment package, it would only work if you had the config dependency in your main package. Version 0.1.2 includes the dependency.

MERCHANT AND SHOPPER FLOWS

To be more consistent with the terminology we are using for end-to-end testing we have renamed a few test flows.

  • StoreOwnerFlow is now merchant
  • CustomerFlow is now shopper

Tests using either StoreOwnerFlow or CustomerFlow will log a deprecated message. The deprecated messages are warnings and will not cause tests to fail.

UTILITY FUNCTIONS

We added a number of utility functions. See @woocommerce/e2e-utils for more details.

@woocommerce/e2e-environment

Note: With this release we have completed all of the planned features for this package. As a result, we have bumped the version of the package to 0.2.0. While we may have maintenance releases, we are not planning any new development for this package.

DOCKER LIBRARY NEW IMAGE DELAY

When new images are published by Docker, such as images containing new versions of PHP, the image is initially pushed to the API that we query to get the latest software versions. There is a time lag between new images being listed as available on the API and being available to docker-compose. We changed the image version lookup to ignore images that are less than 12 hours old.

E2E SHORTHAND SCRIPT

In version 0.1.6 accessing the package scripts required you to run the following command:

npm explore @woocommerce/e2e-environment -- npm run <script>

In 0.2.0 npx wc-e2e <script> accomplishes the same thing.

CUSTOM CONTAINER NAME

In version 0.1.6 the Docker containers were automatically named <project-folder-name>_*. In 0.2.0 you can implement a custom container prefix in tests/e2e/config/default.json. For example:

"url": "http://localhost:8084/",
"appName": "custom_container_prefix",

For full details on the release see @woocommerce/e2e-environment.

What’s Next?

We will be publishing resources in the developer portal in the near future to provide instructions on implementing these packages in your development projects.

Over the next few months, we will continue to iterate on the core tests and API packages. As we flesh those packages out, we will be adding functionality to the utilities package. We will be releasing updates to those packages as that work completes.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.