Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coverage show n/a] #1027

Open
HoangLongTrinh opened this issue Jan 18, 2024 · 1 comment
Open

[Coverage show n/a] #1027

HoangLongTrinh opened this issue Jan 18, 2024 · 1 comment

Comments

@HoangLongTrinh
Copy link

Q A
php-code-coverage version 9.2.30
PHP version 8.1.27
Driver PCOV / Xdebug
PCOV version 1.0.11
Xdebug version 3.3.1
Installation Method Composer
Usage Method PHPUnit
PHPUnit version 9.6.15

this is my config phpunit.xml

<?xml version="1.0" encoding="UTF-8"?>
<phpunit
    bootstrap="./Bootstrap.php"
    backupGlobals="false"
    colors="true"
    processIsolation="false"
    stopOnFailure="true"
    stopOnError="true"
    verbose="true"
    stderr="true">
    <testsuites>
        <testsuite name="test-cover">
            <directory suffix="test.php">./</directory>
            <exclude>./_ci_phpunit_test/</exclude>
        </testsuite>
    </testsuites>
    <coverage processUncoveredFiles="true" includeUncoveredFiles="true" pathCoverage="false" ignoreDeprecatedCodeUnits="true" disableCodeCoverageIgnore="true">
        <include>
            <directory suffix=".php">../controllers</directory>
            <directory suffix=".php">../models</directory>
            <directory suffix=".php">../services</directory>
        </include>
        <report>
            <html outputDirectory="build/coverage" lowUpperBound="80" highLowerBound="100"/>
            <text outputFile="build/logs/coverage.txt"/>
        </report>
    </coverage>

    <logging>
        <junit outputFile="build/logs/junit.xml"/>
    </logging>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="XDEBUG_MODE" value="coverage"/>
        <ini name="memory_limit" value="-1"/>
    </php>
</phpunit>

when a run a code coverage, i got same like picture :(
I'm make sure 100% that the code runs through those functions,
please help me @sebastianbergmann , thank you so much!
image
image

@sebastianbergmann
Copy link
Owner

Thank you for your report.

Please provide a minimal, self-contained, reproducing test case that shows the problem you are reporting.

Without such a minimal, self-contained, reproducing test case I will not be able to investigate this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants