Giter VIP home page Giter VIP logo

Comments (10)

Naktibalda avatar Naktibalda commented on June 12, 2024

Excluding is no longer supported by phpunit/php-code-coverage library, you must be more specific about what code is included.

from codeception.

Naktibalda avatar Naktibalda commented on June 12, 2024

At a second glance, implementation of exclude is not that difficult.

from codeception.

zdenekgebauer avatar zdenekgebauer commented on June 12, 2024

Thank you. Exclude is very useful feature, because coverage vendor is useless and often slow.

from codeception.

Naktibalda avatar Naktibalda commented on June 12, 2024

@zdenekgebauer Could you test my branch by installing "codeception/codeception": "dev-coverage-exclude-for-phpunit11 as 5.1.1" ?

from codeception.

zdenekgebauer avatar zdenekgebauer commented on June 12, 2024

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.

Naktibalda avatar Naktibalda commented on June 12, 2024

Did your configuration work with PHPUnit 10?

Any chance that you actually have both directories - vendor/ and www/vendor/?

from codeception.

KacerCZ avatar KacerCZ commented on June 12, 2024

@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.

zdenekgebauer avatar zdenekgebauer commented on June 12, 2024

I created repo https://github.com/zdenekgebauer/test-codecept-exclude with simple test. Excluding vendor stil not working,

from codeception.

Naktibalda avatar Naktibalda commented on June 12, 2024

@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.

zdenekgebauer avatar zdenekgebauer commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.