Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#52613 new enhancement

Add testing setup instructions on wordpress-develop repository readme

Reported by: gwwar's profile gwwar Owned by:
Milestone: Future Release 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 (6)

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


3 years ago
#1

  • 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
3 years ago

  • Milestone changed from Awaiting Review to 5.8

This ticket was mentioned in Slack in #core by chaion07. View the logs.


3 years ago

#4 @lukecarbis
3 years ago

  • Milestone changed from 5.8 to Future Release

#5 @SergeyBiryukov
2 years ago

  • Milestone changed from Future Release to 5.9

#6 @hellofromTonya
2 years ago

  • Milestone changed from 5.9 to Future Release

Today is 5.9 Feature Freeze. I'll punt this to Future Release (as 6.0 isn't
available yet for selection).

Test and build tool changes are allowed after feature freeze up until RC. If someone is able to work on this before then, it can always be moved back.

Note: See TracTickets for help on using tickets.