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.1M↓42.1%28MITPHPCI passing

Since Nov 23Pushed 1w 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 2w 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

54

—

FairBetter than 97% of packages

Maintenance64

Regular maintenance activity

Popularity52

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 97% 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

2061d 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 (32 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 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)
```

###  Alternatives

[retinens/laravel-cookie-consent

Make your Laravel app comply with the crazy EU cookie law

354.6k](/packages/retinens-laravel-cookie-consent)

PHPackages © 2026

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