Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
424 views

I wish to determine which files are covered by each of my test suites separately. I am using PHPUnit 10.5 with Xdebug for code coverage on my PHP 8.1 project. Here is what my phpunit.xml configuration ...
Kolobo's user avatar
  • 59
1 vote
0 answers
763 views

I need to test my code and coverage. I already install Xdebug extension What I have in my local is PHP & xdebug version PHP 8.1.20 (cli) (built: Jun 14 2023 05:48:10) (NTS) Copyright (c) The PHP ...
Shruthi's user avatar
  • 11
0 votes
0 answers
123 views

In php, there are many aop packages that generate proxy classes to replace the original classes in the composer class map. I'm not sure how to properly generate a code coverage report if this is the ...
zds's user avatar
  • 1
0 votes
0 answers
45 views

I want to test the coverage of a php web application. I need to get the coverage in real time while the program is running, like nyc or jacoco. Instead of getting it when ending the program, or ...
kreamyu's user avatar
1 vote
1 answer
2k views

I have a github action which runs the php unit test followed by Sonarqube scanner but the Sonarqube code coveage is always 0% Phpunit Test is ok Sonaiqube ok as well but no CodeCoverage These is my ...
Tara Prasad Gurung's user avatar
2 votes
1 answer
734 views

I use phpUnit with PCOV on code coverage on window. But somehow, I get 0.0% code coverage. I am sure the function is called. Why is this happening? Versions: PHP: 8.1.12 PHPUnit: 9.5.0 PCOV: 1.0.11 ...
george's user avatar
  • 21
0 votes
1 answer
171 views

Maybe I am burn out but: Anyone knows how can I see the code coverage report in Azure Pipelines of the PHP Core project? I have this link: https://dev.azure.com/phpazuredevops/PHP/_build?...
jcmargentina's user avatar
1 vote
0 answers
205 views

I just started working on a piece of software using PHP 7.4.27 with PHPUnit 9.5.7 and Xdebug 2.9.8. I am collection code coverage including branch and path coverage information for all my unit tests. ...
CrasyHorse's user avatar
0 votes
0 answers
2k views

I use PHP 7.4.13, PhpStorm 2020.1.4, PHPUnit 9.5.8. I try to use PHPUnit code coverage tool with PCOV, but I don't get it to work. I installed pcov: pecl install pcov I enabled the extension in the ...
Nele's user avatar
  • 143
3 votes
2 answers
3k views

I use PHPUnit 9.5.7 on php 8.0.3 I would like to have a checker for minimum code coverage of lines as a git hook. I have seen in online examples a simple 3 line output as a summary after running the ...
Calamity Jane's user avatar
3 votes
2 answers
8k views

I'm using phpstorm and wrote some test in my laravel app. The phpunit.xml is alsmost default. <?xml version="1.0" encoding="UTF-8"?> <phpunit xmlns:xsi="http://www.w3....
lordisp's user avatar
  • 732
0 votes
1 answer
2k views

Hi everybody, i have some problem with phpunit coverage html component. I installed correctly components and launch command: vendor/bin/phpunit --coverage-html tests Tests works correctly, but no html ...
SimoGiansa's user avatar
1 vote
0 answers
905 views

I "inherited" a very old PHP project compatible only with PHP 5.6 and written without any framework, and I'm trying to "modernize" it for PHP 7.x and adding some unit tests and some code inspection ...
Mat's user avatar
  • 596
1 vote
0 answers
49 views

I currently use the php-code-coverage tool and i m wondering if there is a opensource tool to journalize the code-coverage day by day (or tests by tests) I would like to track the progress or regress ...
mik3fly-4steri5k's user avatar
0 votes
3 answers
1k views

I am getting following error PHPUnit\Framework\Exception: PHP Fatal error: Uncaught Error: Class 'Route' not found in /var/www/html/checkout/routes/api.php:24 I have tried answer from Error: Class ...
Roshni joshi's user avatar
0 votes
0 answers
219 views

I'm using PHPUnit to generate code coverage data using the HTML logging type. Sometimes I'll generate a full coverage log across the whole codebase, and then rerun the tests with coverage on a smaller ...
JMac's user avatar
  • 405
1 vote
0 answers
30 views

I am trying to determine the code-coverage of a group of unit tests. How can I do this? I have phpUnit and XDebug installed on my machine and from what I understand these tools will do the job but I ...
J Olson's user avatar
  • 215
2 votes
3 answers
3k views

I've come across a bit unusual scenario where my function returns multiple types string or integer. I'm trying to declare return types. Could anyone please suggest me the best practice here to declare....
Developer's user avatar
  • 4,008
2 votes
2 answers
120 views

I'm running some tests and some reports don't make sense for example: I also have another example: Why xdebug marks 587 and 588 as not executed and 589 as executed?
Andrei Lupuleasa's user avatar
3 votes
1 answer
277 views

PHPUnit code coverage is reporting 100% coverage for the following function which is clearly wrong: public function run(){ foreach ([1] as $value) { if($value === 1 ){ ...
David's user avatar
  • 2,281
3 votes
0 answers
185 views

I am trying to do phpunit testing using codeception and guzzle on my API written on php, all the tests are running but the codecoverage is always showing 0/0. I am sharing my test function below ...
Utsav Chatterjee's user avatar
0 votes
0 answers
1k views

When run command phpunit --bootstrap="TestHelper.php" --coverage-clover coverage.xml --whitelist="../../../" --debug --log-junit result.xml ./ It generates result.xml but console get stuck after ...
Parth Soni's user avatar
1 vote
1 answer
1k views

I am working on a php project in magento2. I am using mock objects for writing unit test cases. I came to know that when i generate code coverage report, Mocked classes and methods do not show as ...
Kapil Yadav's user avatar
1 vote
1 answer
485 views

I'm trying to get the PHP_CodeCoverage library working for the simplest possible case to create an HTML code coverage report, and failing. I have PHP and Xdebug installed. I would rather not specify ...
DivergentSpaceTimeWanderer's user avatar
1 vote
1 answer
622 views

I have a fresh Laravel Boilerplate running on a Laravel Homestead environment which runs perfect. The php -v command was returning me this info PHP 7.1.2-3+deb.sury.org~xenial+1 (cli) (built: Feb 22 ...
Matheus Vellone's user avatar
1 vote
1 answer
696 views

I have been using PhpUnit with good results, testing my code with assertions only. Recently I decided to try PhpUnit with coverage report analysis but I noticed that tests that use dataProvider ...
peej's user avatar
  • 61
2 votes
2 answers
585 views

Any one can help me to solve my problem. I want to run phpunit on php5.6 but got the issue :~$ phpunit PHP Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or ...
Vipin Kumar's user avatar
1 vote
1 answer
3k views

I've set in my phpunit.xml to do the following: <filter> <whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true"> <directory suffix=".php"...
Ray's user avatar
  • 41.6k
-1 votes
1 answer
610 views

I am running below command to create code coverage in html form vendor/phpunit/phpunit/phpunit --whitelist --coverage-html tests It is running but not creating code coverage report.
Kalashir's user avatar
  • 1,137
0 votes
0 answers
212 views

In the build.xml of my Jenkins (PHP) project (hosted on a Windows Server) multiple reports are defined (PMD Warnings, Duplicate Code, JDepend, Checkstyle Warnings, Coverage Summary Report, ...
automatix's user avatar
  • 15.2k
2 votes
1 answer
2k views

Since I still have troubles with PHPUnit / PHP Code Coverage and Xdebug, I decided to try it another way -- with phpdbg. I did it as hier shown. Tried in CMD and also in Git Bash, but the result is ...
automatix's user avatar
  • 15.2k