#53414 closed enhancement (fixed)
Add how to run php coverage reports to readme.md
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.8 | Priority: | normal |
| Severity: | minor | Version: | |
| Component: | Build/Test Tools | Keywords: | needs-docs has-patch commit |
| Focuses: | docs | Cc: |
Description
With the@Covers getting added in #39265 we need to make it easy to run/create the coverage reports
So let's add the instructions to the readme.md file
Change History (12)
#2
@
5 years ago
- Focuses docs added
- Milestone changed from Awaiting Review to 5.9
- Owner set to hellofromTonya
- Severity changed from normal to minor
- Status changed from new to assigned
Thanks @pbearne for creating this ticket. Moving it into 5.9.
This ticket was mentioned in PR #1418 on WordPress/wordpress-develop by pbearne.
5 years ago
#3
- Keywords has-patch added; needs-patch removed
added support for local coverage reports
Trac ticket: https://core.trac.wordpress.org/ticket/53414
#4
@
4 years ago
- Keywords needs-refresh added; has-patch removed
Left some feedback and requested a few changes on https://github.com/WordPress/wordpress-develop/pull/1418#pullrequestreview-741086937
#5
@
4 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.
#6
@
23 months ago
- Owner hellofromTonya deleted
As of today, I'm no longer a sponsored contributor and am starting a month or more AFK break. To not stand in the way, I'm clearing me as the ticket owner, which opens the ticket for someone to step in to shepherd this ticket forward to resolution.
#7
@
16 months ago
- Keywords changes-requested added
- Milestone changed from Future Release to 6.8
A lot has changed since this was opened and it should be much easier to accomplish this with the Docker environment than the current PR suggests. Mainly, the changes in docker-compose.yml should no longer be necessary.
The current process is:
- In your
.envfile, update theLOCAL_PHP_XDEBUGvariable totrueand theLOCAL_PHP_XDEBUG_MODEvariable tocoverage. - Start the environment with
npm run env:startor restart it withnpm run env:restart. - Run the PHPUnit tests and supply additional arguments to configure coverage. For example,
npm run test:php -- --coverage-html ./coveragegenerates an HTML format report.
For the last item, I agree that we could introduce a new command in the package.json file similar to what the PR has, but I think there should only be one, php:test-coverage that calls test:php and passes all the needed arguments to generate all report formats we decide are necessary. I think HTML and text make sense as human-readable formats, and PHP as a machine readable one.
I like how the current PR uses a top level coverage folder with format specific subfolders. We'll need to add this coverage folder to .gitignore and svn:ignore as well.
This ticket was mentioned in PR #7647 on WordPress/wordpress-develop by @pbearne.
16 months ago
#8
- Keywords has-patch added; needs-refresh removed
Introduced a new npm run test:test-coverage command for generating HTML test coverage reports. Updated README to reflect the new command and usage, and modified .gitignore to exclude coverage report files.
#9
@
16 months ago
- Keywords changes-requested removed
@desrosj
I have added a new pull request (I broke the old one)
I found a way to avoid changing the .env file :-)
I could find the svn:ignore to update.
Lets get this in
it looks like we will have to install xdebug into the runner for the coverage reports