open-southeners/phpunit-todo-markdown-printer
最新稳定版本:1.1.0
Composer 安装命令:
composer require open-southeners/phpunit-todo-markdown-printer
包简介
Print your failed tests as a to do list in Markdown format
关键字:
README 文档
README
Print your failed tests as a to do list in Markdown format
Status
Getting started
composer require open-southeners/phpunit-todo-markdown-printer
Configuration
Add the following to your phpunit.xml:
<listeners> <listener class="OpenSoutheners\PHPUnitTodoMarkdownPrinter\Printer"> <arguments> <string name="out">todo_failed_tests.md</string> <boolean name="reportRiskyTests">true</boolean> <boolean name="reportIncompleteTests">true</boolean> <boolean name="reportSkippedTests">true</boolean> </arguments> </listener> </listeners>
And that's all you need to do, from now on your todo_failed_tests.md will have the markdown similar as the one below.
Example output
Code
# Failed tests A summary of tests that failed. **Total of 1 failed within 1 files**. ## CommentControllerTest - [ ] test_that_fails_mostly ``` Call to a member function getKey() on null at /Users/my_user/Projects/my_project/app/Notifications/Notification.php:34 ---------- #0 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestCase.php(904): PHPUnit\Framework\TestResult->run(Object(Tests\Integration\Http\Controllers\Api\CommentControllerTest)) #1 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult)) #2 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult)) #3 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult)) #4 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(661): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult)) #5 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/TextUI/Command.php(144): PHPUnit\TextUI\TestRunner->run(Object(PHPUnit\Framework\TestSuite), Array, Array, true) #6 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run(Array, true) #7 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/phpunit(98): PHPUnit\TextUI\Command::main() #8 {main} ```
Preview
Failed tests
A summary of tests that failed. Total of 1 failed within 1 files.
CommentControllerTest
- test_that_fails_mostly
Call to a member function getKey() on null
at /Users/my_user/Projects/my_project/app/Notifications/Notification.php:34
----------
#0 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestCase.php(904): PHPUnit\Framework\TestResult->run(Object(Tests\Integration\Http\Controllers\Api\CommentControllerTest))
#1 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit\Framework\TestCase->run(Object(PHPUnit\Framework\TestResult))
#2 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#3 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/Framework/TestSuite.php(675): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#4 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(661): PHPUnit\Framework\TestSuite->run(Object(PHPUnit\Framework\TestResult))
#5 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/TextUI/Command.php(144): PHPUnit\TextUI\TestRunner->run(Object(PHPUnit\Framework\TestSuite), Array, Array, true)
#6 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run(Array, true)
#7 /Users/my_user/Projects/my_project/vendor/phpunit/phpunit/phpunit(98): PHPUnit\TextUI\Command::main()
#8 {main}
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-20