Comments (10)
Excluding is no longer supported by phpunit/php-code-coverage library, you must be more specific about what code is included.
from codeception.
At a second glance, implementation of exclude is not that difficult.
from codeception.
Thank you. Exclude is very useful feature, because coverage vendor is useless and often slow.
from codeception.
@zdenekgebauer Could you test my branch by installing "codeception/codeception": "dev-coverage-exclude-for-phpunit11 as 5.1.1"
?
from codeception.
Warning is gone, but coverage report still contains directory tests/_output/coverage/vendor/* . I have project directory structure:
- tests/*
- www/app/*
- www/vendor/*
- codeception.dist.yml
configuration contains:
coverage:
enabled: true
include:
- www/*
exclude:
- vendor/*
I tried also
exclude:
- www/vendor/*
it makes no difference.
from codeception.
Did your configuration work with PHPUnit 10?
Any chance that you actually have both directories - vendor/
and www/vendor/
?
from codeception.
@Naktibalda Thank you, tested and works.
I've tested PR on project currently using Codeception + PHPUnit 10.
Used Codeception with patch, upgraded PHPUnit to 11, did not changed anything in codeception.yml
.
Code coverage was generated as expected (HTML report).
from codeception.
I created repo https://github.com/zdenekgebauer/test-codecept-exclude with simple test. Excluding vendor stil not working,
from codeception.
@zdenekgebauer You sample repo still uses wrong path - you have to exclude www/vendor
.
I found and fixed a bug which produced different fully qualified file names when wildcard pattern was one directory level deep e.g. www/*
and when it had more levels (www/vendor/*
).
from codeception.
I've made an update to the test repository https://github.com/zdenekgebauer/test-codecept-exclude, adding tests to cover files located in various directories. Everything is functioning as expected, including the exclusion of vendor files.
Thank you very much!
from codeception.
Related Issues (20)
- Output messages don't make sense HOT 4
- Try-catch in the second test catches fail in the first test HOT 6
- Call to srand() with non-int fails with PHP < 8.3
- unit test case error on container HOT 2
- No way to run invividual tests in groups HOT 1
- Providing null data with Examples annotation fails HOT 3
- skip_cleanup_if_failed documentation HOT 1
- Support phpunit 11 HOT 1
- "No primary site exists" only when running unit tests - Craft 4 Pro. No issues with functional and acceptance tests in same environment HOT 4
- Using Symfony 7 Clock ClockSensitiveTrait causes a LogicException HOT 2
- Future of Codeception? HOT 4
- Can I change the format of the exception display? HOT 2
- Running with --no-ansi still uses color HOT 1
- Codeception 5 + Symfony 6 HOT 2
- Run build command without bootstrap
- [JsonException] Non-backed enums have no default serialization
- "Warning: Uninitialized string offset 1 in Parser.php:160" when using readonly on anonymous classes
- Overridden DataProvider function not being called in Codeception v5.1.2 HOT 3
- gherkin:snippets command still produces old syntax
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeception.