Title: State of e2e testing in WordPress Core
Author: Justin Ahinon
Published: June 23, 2021
Last modified: December 19, 2023

---

 [  ](https://profiles.wordpress.org/justinahinon/) [Justin Ahinon](https://profiles.wordpress.org/justinahinon/)
6:51 am _on_ June 23, 2021      

# State of e2e testing in WordPress Core

End-to-end (E2E) tests allow simulating user flows for an application, a site and
validating them. They allow for automated testing of user interactions while providing
a safety net for continuous development.

Over the past two years, the groundwork for implementing e2e tests in WordPress 
CoreCore Core is the set of software required to run WordPress. The Core Development
Team builds WordPress. has been laid. However, there hasn’t been much communication
about the technical stack that is used for these tests or the next steps for adding
more tests in WordPress.

The purpose of this post is to inform contributors about the current status of e2e
testing in WordPress Core, the technologies being used, and what is currently being
done to implement these tests.

# What stack are we using for WordPress Core e2e tests?

E2e testing in WordPress Core is implemented with Jest as the testing framework 
and Puppeteer for browser interactions. This stack is relevant for Core use case
because it is present in other parts of the CMS codebase. 

On the other hand, it is used by GutenbergGutenberg The Gutenberg project is the
new Editor Interface for WordPress. The editor improves the process and experience
of creating new content, making writing rich content much simpler. It uses ‘blocks’
to add richness rather than shortcodes, custom HTML etc. [https://wordpress.org/gutenberg/](https://wordpress.org/gutenberg/)
for its tests. So we are not starting from scratch for the implementation in Core,
as there is already some preliminary work done with the [@wordpress/e2e-tests](https://github.com/WordPress/gutenberg/tree/trunk/packages/e2e-tests)
package and the [@wordpress-e2e-utils utility](https://github.com/WordPress/gutenberg/tree/trunk/packages/e2e-test-utils)
package, which includes several basic flows that can be reused in tests.

# What tests are currently implemented in Core?

Currently, only the setup for testing and a basic test of the WordPress Dashboard
homepage are implemented in Core here. The [@wordpress/e2e-tests-utils utility package](https://www.npmjs.com/package/@wordpress/e2e-test-utils)(
in the Gutenberg repository) contains various tests for installing, disabling, activating
themes and plugins, navigating the different admin pages, etc.

# What is the Test Team working on?

There are currently efforts being made to implement more e2e tests in WordPress 
Core. Starting with [this ticket](https://core.trac.wordpress.org/ticket/52895),
opened by [@isabel_brison](https://profiles.wordpress.org/isabel_brison/) that presents
an overview of the different tests that will be implemented.

There are also pull requests, and branches from contributors who have already implemented
tests for some parts of WordPress:

 * PR for add/edit posts tests: [https://github.com/WordPress/wordpress-develop/pull/1089](https://github.com/WordPress/wordpress-develop/pull/1089)
 * Branch for Core categories tests: [https://github.com/JustinyAhin/wordpress-develop/blob/try/add-new-category-tests/tests/e2e/specs/add-edit-category.test.js](https://github.com/JustinyAhin/wordpress-develop/blob/try/add-new-category-tests/tests/e2e/specs/add-edit-category.test.js)
 * Branch for Core users tests: [https://github.com/JustinyAhin/wordpress-develop/blob/add/users-tests/tests/e2e/specs/users.test.js](https://github.com/JustinyAhin/wordpress-develop/blob/add/users-tests/tests/e2e/specs/users.test.js)

The next step is to start on the overview of the e2e tests to be implemented by 
creating smaller tickets for each of the tests, and then write the tests.

Any interested contributor is invited to comment on [the ticket](https://core.trac.wordpress.org/ticket/52895)
to propose other test scenarios, learn, and/or help build tests. All are welcomed.

# Resources

## Blog posts

[Introducing the WordPress e2e tests](https://make.wordpress.org/core/2019/06/27/introducing-the-wordpress-e2e-tests/)

[E2E (End-To-End) Testing in Core Proposal](https://make.wordpress.org/core/2020/08/07/e2e-end-to-end-testing-in-core-working-group-proposal/)

## Tickets

[Overview of e2e tests to be written](https://core.trac.wordpress.org/ticket/52895)

---

_Props [@francina](https://profiles.wordpress.org/francina/) and [@hellofromtonya](https://profiles.wordpress.org/hellofromtonya/)
for reviews and edits._

### Share this:

 * [  Threads ](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?share=threads)
 * [  Mastodon ](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?share=mastodon)
 * [  Bluesky ](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?share=bluesky)
 * [  X ](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?share=x)
 * [  Facebook ](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?share=facebook)
 * [  LinkedIn ](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?share=linkedin)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Ftest%2F2021%2F06%2F23%2Fstate-of-e2e-testing-in-wordpress-core%2F%23respond&locale=en_US)

### Like this:

Like Loading…

 1. ![](https://secure.gravatar.com/avatar/bffd352fa7e33a13bc85923e4694e70e89e415875f97dd9aea920fb1a86f83b0?
    s=32&d=identicon&r=g)
 2.  [Isabel Brison](https://profiles.wordpress.org/isabel_brison/)  6:12 am _on_ June
    29, 2021
 3. Great post, thanks for putting it together Justin!
 4. Another useful resource for writing and debugging tests is the [testing overview](https://developer.wordpress.org/block-editor/contributors/code/testing-overview/)
    in the dev handbook.

### Leave a Reply 󠀁[Cancel reply](https://make.wordpress.org/test/2021/06/23/state-of-e2e-testing-in-wordpress-core/?output_format=md#respond)󠁿

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Ftest%2F2021%2F06%2F23%2Fstate-of-e2e-testing-in-wordpress-core%2F&locale=en_US)
to post a comment.

# Post navigation

[← Upcoming FSE Outreach Program Schedule (June & July)](https://make.wordpress.org/test/2021/06/09/upcoming-fse-outreach-program-schedule-june-july/)

[FSE Program Polished Portfolios Summary →](https://make.wordpress.org/test/2021/06/24/fse-program-polished-portfolios-summary/)