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

Details about tests that are considered risky are not displayed when the TestDox result printer is used #5488

Closed
ghostwriter opened this issue Aug 25, 2023 · 3 comments
Assignees
Labels
feature/test-runner CLI test runner feature/testdox The TextDox printer/formatter type/bug Something is broken version/10 Something affects PHPUnit 10

Comments

@ghostwriter
Copy link
Contributor

Q A
PHPUnit version 10.x
PHP version 8.2.9
Installation Method Composer & PHAR

Summary

When test's are marked risky , while using --testdox the error messages are not printed, even with --display-* set.

Current behavior

The error message is not printed.

How to reproduce

--TEST--
Testdox: Missing force-covers-annotation error messages "This test does not define a code coverage target but is expected to do so".
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--testdox';
$_SERVER['argv'][] = '--display-errors';
$_SERVER['argv'][] = '--display-notices';
$_SERVER['argv'][] = '--display-warnings';
$_SERVER['argv'][] = '--display-deprecations';
$_SERVER['argv'][] = '--strict-coverage';
$_SERVER['argv'][] = '--configuration';
$_SERVER['argv'][] = __DIR__ . '/../_files/force-covers-annotation/phpunit.xml';
$_SERVER['argv'][] = __DIR__ . '/../_files/force-covers-annotation/tests/Test.php';

require_once __DIR__ . '/../../bootstrap.php';

(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

Runtime: %s
Configuration: %s

R                                                                   1 / 1 (100%)

Time: %s, Memory: %s

Unnamed Tests (PHPUnit\TestFixture\UnnamedTests)
 ☢ One

OK, but there were issues!
Tests: 1, Assertions: 1, Risky: 1.

Expected behavior

I expect "This test does not define a code coverage target but is expected to do so" to be printed under the method name.

@ghostwriter ghostwriter added type/bug Something is broken version/10 Something affects PHPUnit 10 labels Aug 25, 2023
@ghostwriter
Copy link
Contributor Author

Maybe Related #5437

@sebastianbergmann sebastianbergmann added feature/testdox The TextDox printer/formatter feature/test-runner CLI test runner labels Aug 25, 2023
@sebastianbergmann sebastianbergmann changed the title Testdox printer dose not print error messages for risky tests Testdox printer does not print error messages for risky tests Aug 25, 2023
@sebastianbergmann sebastianbergmann added this to the PHPUnit 10.4 milestone Sep 20, 2023
@sebastianbergmann sebastianbergmann self-assigned this Sep 20, 2023
@sebastianbergmann
Copy link
Owner

The fix for this requires the changes that will be made for #5518 (or at least will be easier after these changes).

@sebastianbergmann
Copy link
Owner

I will work on this immediately after #5518 (comment).

@sebastianbergmann sebastianbergmann changed the title Testdox printer does not print error messages for risky tests TestDox result printer does not print details for tests that are considered risky Dec 30, 2023
@sebastianbergmann sebastianbergmann changed the title TestDox result printer does not print details for tests that are considered risky Details about tests that are considered risky are not displayed when the TestDox result printer is used Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner feature/testdox The TextDox printer/formatter type/bug Something is broken version/10 Something affects PHPUnit 10
Projects
None yet
Development

No branches or pull requests

2 participants