Support for the PHPUnit dialect of JUnit

Refactor PHPUnit support into separate phpunit-junit parser

Instead of modifying the Java JUnit parser, this creates a dedicated
PHPUnit parser that properly handles PHPUnit's nested testsuite elements.
This keeps the parsers cleanly separated and allows for future PHPUnit-
specific features.

Co-Authored-By: Matteo Beccati <matteo@beccati.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Jozef Izso
2025-12-29 12:56:17 +01:00
parent ee446707ff
commit d1de4d5f06
10 changed files with 665 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ This [Github Action](https://github.com/features/actions) displays test results
- Java / [JUnit](https://junit.org/)
- JavaScript / [JEST](https://jestjs.io/) / [Mocha](https://mochajs.org/)
- Python / [pytest](https://docs.pytest.org/en/stable/) / [unittest](https://docs.python.org/3/library/unittest.html)
- PHP / [PHPUnit](https://phpunit.de/)
- Ruby / [RSpec](https://rspec.info/)
- Swift / xUnit
@@ -147,6 +148,7 @@ jobs:
# java-junit
# jest-junit
# mocha-json
# phpunit-junit
# python-xunit
# rspec-json
# swift-xunit
@@ -314,6 +316,14 @@ This is due to the fact Java stack traces don't contain a full path to the sourc
Some heuristic was necessary to figure out the mapping between the line in the stack trace and an actual source file.
</details>
<details>
<summary>phpunit-junit</summary>
[PHPUnit](https://phpunit.de/) can generate JUnit XML via CLI:
`phpunit --log-junit reports/phpunit-junit.xml`
</details>
<details>
<summary>jest-junit</summary>