WordPress.org

Make WordPress Core

Opened 8 weeks ago

Last modified 8 weeks ago

#52613 new enhancement

Add testing setup instructions on wordpress-develop repository readme

Reported by: gwwar Owned by:
Milestone: 5.8 Priority: normal
Severity: minor Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: docs Cc:

Description

While setting up my environment, I was surprised by running unit tests and seeing an error about a missing config file.

Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.
child_process.js:655
    throw err;

While I do expect configuration setup when trying to run tests against a different local instance, seeing this error when trying to run this against the docker env made me question if I was doing something wrong.

I have a pull request that makes some suggested changes in the readme to help guide others:

https://github.com/WordPress/wordpress-develop/pull/1033

Change History (2)

This ticket was mentioned in PR #1033 on WordPress/wordpress-develop by gwwar.


8 weeks ago

  • Keywords has-patch added

This PR updates the readme to add instructions to create wp-tests-config.php before running tests.

If we run npm run test:php we'll see the following error if wp-tests-config.php doesn't exist.

Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.
child_process.js:655
    throw err;

While I do expect configuration setup when trying to run tests against a different local instance, seeing this error when trying to run this against the docker env made me question if I was doing something wrong.

Fixes https://core.trac.wordpress.org/ticket/52613

#2 @SergeyBiryukov
8 weeks ago

  • Milestone changed from Awaiting Review to 5.8
Note: See TracTickets for help on using tickets.