List all skipped tests with PHPUNIT
Asked Answered
A

2

12

I have searched and read the docs, or at least I think I have, but I have been unable to find if there a way to get a list of all the skipped tests with PHPUNIT?

Is this possible?

Argillaceous answered 7/4, 2016 at 2:2 Comment(3)
Use the verbose option. Not exactly a list but you can view the skipped and incomplete testsHendren
I see the logIncompleteSkipped in the logging configuration section here but I haven't never try....Scotia
It looks like verbose is the only way to get the list from the command line and that sebastian is not going to add that functionality. Ideally I'd like to skip running all of the tests and just get a list, but verbose is good, thanks.Argillaceous
S
11

You could get something close using awk:

phpunit -v | awk '/skipped tests/,/Tests\:/'

This will output a list from the start of There are x skipped tests to the end of the output with the summary line

Submediant answered 8/8, 2017 at 0:0 Comment(0)
F
3

With PHPUnit 10:

phpunit --display-skipped

or within the phpunit.xml

<phpunit
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
  bootstrap="vendor/autoload.php"
  colors="true"
  displayDetailsOnTestsThatTriggerDeprecations="true"
  displayDetailsOnTestsThatTriggerNotices="true"
  displayDetailsOnTestsThatTriggerWarnings="true"
  displayDetailsOnTestsThatTriggerErrors="true"
  displayDetailsOnSkippedTests="true"
>
Fleecy answered 18/9, 2023 at 5:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.