Download the PHP package hollodotme/phpunit-testdox-markdown without Composer
On this page you can find all versions of the php package hollodotme/phpunit-testdox-markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hollodotme/phpunit-testdox-markdown
More information about hollodotme/phpunit-testdox-markdown
Files in hollodotme/phpunit-testdox-markdown
Package phpunit-testdox-markdown
Short Description A PHPUnit test listener that creates a testdox markdown file with grouped dataset output
License MIT
Informations about the package phpunit-testdox-markdown
PHPUnit\TestListeners\TestDox
END OF LIFE
Please note: This project won't receive updates or fixes anymore and was marked as "abandoned" at packagist.org.
However, if you find this code useful in any way, feel free to fork, change and re-publish it. The MIT license applies.
Description
A PHPUnit test listener that creates a testdox markdown file with grouped dataset output
Requirements
- PHP >= 7.1
- PHPUnit >= 7.0
Installation
Usage
If you are using PSR-4 autoloading, add the following to your phpunit.xml
:
If you're not using PSR-4 autoloading, also add the class' file path to the <listener>
tag:
Available listener arguments
Name | Type | Required | Meaning |
---|---|---|---|
environment |
string |
YES | Is printed on top of the testdox report to identifiy on which build stage the report has been created. |
outputFile |
string |
YES | Relative path to the markdown testdox output file. Please note: the path must be relative to your current working directory, not to the location of the phpunit.xml . |
baseNamespace |
string |
NO | A part of your test namespace to shorten the output headlines. Example: Your test namespace is YourVendor\YourProject\Tests\Unit and you set baseNamespace to YourVendor\YourProject\Tests all headlines will be prefixed with Unit\ only. |
testStatusMap |
array |
NO | A key-value array of strings that let's you manipulate the icons for each test result status. See example below. |
Example with all available arguments
Example output
๐ Passed | ๐ Error | ๐ Failure | ๐งก Warning | ๐ Risky | ๐ Incomplete | ๐ Skipped
Test suite: Unit-Test-Suite
- Environment:
Testing
- Base namespace:
hollodotme\PHPUnit
UnitTest
- [x] Can Have Single Test (๐ 1)
- [ ] Can Have Test With Data Sets (๐ 3, ๐ 3, ๐ 3, ๐ 3, ๐งก 3, ๐ 3)
3: DataSet is risky.
4: DataSet is risky.
5: DataSet is risky.
6: DataSet was skipped.
7: DataSet was skipped.
8: DataSet was skipped.
9: DataSet is incomplete.
10: DataSet is incomplete.
11: DataSet is incomplete.
12: DataSet creates warning.
13: DataSet creates warning.
14: DataSet creates warning.
15: DataSet fails.
16: DataSet errors out.
17: DataSet errors out.
Report created at 2018-05-21 22:23:12 (UTC)
Contributing
Contributions are welcome and will be fully credited. Please see the contribution guide for details.