PHPackages                             n98/junit-xml - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. n98/junit-xml

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

n98/junit-xml
=============

JUnit XML Document generation library

1.1.0(5y ago)169.0M↓45.1%2[1 PRs](https://github.com/cmuench/junit-xml/pulls)8MITPHPCI passing

Since Nov 23Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/cmuench/junit-xml)[ Packagist](https://packagist.org/packages/n98/junit-xml)[ RSS](/packages/n98-junit-xml/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (5)Used By (8)

JUnit XML Document Generator Library
------------------------------------

[](#junit-xml-document-generator-library)

[![image](https://github.com/cmuench/junit-xml/workflows/CI/badge.svg)](https://github.com/cmuench/junit-xml/actions?query=workflow:CI)

Install component with composer.

```
composer require --dev n98/junit-xml
```

### Example

[](#example)

```
require_once __DIR__ . '/../vendor/autoload.php';

$document = new \N98\JUnitXml\Document();

$suite = $this->document->addTestSuite();
$timeStamp = new \DateTime();
$suite->setName('My Test Suite');
$suite->setTimestamp($timeStamp);
$suite->setTime(0.344244);

$testCase = $suite->addTestCase();
$testCase->addError('My error 1', 'Exception');
$testCase->addError('My error 2', 'Exception');
$testCase->addError('My error 3', 'Exception');
$testCase->addError('My error 4', 'Exception');
$testCase->addFailure('My failure 1', 'Exception');
$testCase->addFailure('My failure 2', 'Exception');

$document->save('results.xml');
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance56

Moderate activity, may be stable

Popularity52

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2588 days

Total

2

Last Release

2016d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3063038da410db15818ca52c05425c4fae11ff53722f0ac948b11f6dba20653?d=identicon)[cmuench](/maintainers/cmuench)

---

Top Contributors

[![cmuench](https://avatars.githubusercontent.com/u/211294?v=4)](https://github.com/cmuench "cmuench (28 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/n98-junit-xml/health.svg)

```
[![Health](https://phpackages.com/badges/n98-junit-xml/health.svg)](https://phpackages.com/packages/n98-junit-xml)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
