• Resolved Maria Daniel Deepak

    (@mariadanieldeepak)


    Where should I check for the code coverage stats when using PHPUnit for WordPress?

    My WordPress setup:

    I have setup WordPress using VVV and my testing suite includes PHPUnit and WP-CLI.

    How I executed test cases to find code coverage?

    When I execute phpunit command to test a WordPress plugin, I’m able to see, if the test cases passed or failed. In my case there were *no failures*.

    To find the code coverage, I executed phpunit --coverage-text=./coverage.txt, the test cases passed but I’m unable to find the coverage.txt file to check the actual code coverage stats.

    A search for coverage.txt file in plugin’s folder using the Windows explorer returned no results. Am I missing something?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to find PHPUnit code coverage stats’ is closed to new replies.