PHPackages                             99designs/php-junit-merge - 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. 99designs/php-junit-merge

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

99designs/php-junit-merge
=========================

PHP-Unit J-Unit XML File Merger

v1.0.0(2y ago)011.9k—0%MITPHPPHP &gt;=5.6

Since Sep 8Pushed 2y agoCompare

[ Source](https://github.com/99designs/php-junit-merge)[ Packagist](https://packagist.org/packages/99designs/php-junit-merge)[ Docs](https://github.com/andreas-weber/php-junit-merge)[ RSS](/packages/99designs-php-junit-merge/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

andreas-weber/php-junit-merge
=============================

[](#andreas-weberphp-junit-merge)

[![Build Status](https://camo.githubusercontent.com/3a7a05ebf28a3859820dfe35ccda98be58382f40f2eac2ac5f65cf04e88d5a9a/68747470733a2f2f7472617669732d63692e6f72672f616e64726561732d77656265722f7068702d6a756e69742d6d657267652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/andreas-weber/php-junit-merge)

**php-junit-merge** is a library that merges multiple junit result xml files.

Installation
------------

[](#installation)

Simply add a dependency on `andreas-weber/php-junit-merge` to your project's `composer.json` file if you use [Composer](http://getcomposer.org/) to manage the dependencies of your project.

Usage
-----

[](#usage)

After updating dependencies by composer a new binary `php-junit-merge` is available for usage.

```
root@dev:~/projects/sample/vendor/bin ./phpjunitmerge
phpjunitmerge 1.0.5 by Andreas Weber

Usage:
 phpjunitmerge [--names="..."] [--ignore="..."] dir file

Arguments:
 dir                   Directory where all files ready to get merged are stored
 file                  The target file in which the merged result should be written

Options:
 --names               A comma-separated list of file names to check (default: "*.xml")
 --ignore              A comma-separated list of file names to ignore (default: "result.xml")
 --help (-h)           Display this help message
 --quiet (-q)          Do not output any message
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
 --version (-V)        Display this application version
 --ansi                Force ANSI output
 --no-ansi             Disable ANSI output
 --no-interaction (-n) Do not ask any interactive question
 --no-suffix           Do not add suffix for test suites with duplicate names

```

The binary expects at least two parameters:

- `dir` is the directory, where the application should search for xml files
- `file` is the result file, in which the application should write the merged content

A simple call could look like this:

```
root@dev:~/projects/sample/vendor/bin ./phpjunitmerge src/Tests/Unit/Fixtures result.xml
phpjunitmerge 1.0.0 by Andreas Weber

Found and processed 3 files. Wrote merged content in 'result.xml'.

```

Example
-------

[](#example)

### Single Result Files

[](#single-result-files)

```

```

### Merged Result File

[](#merged-result-file)

```

```

Developer
---------

[](#developer)

### Environment

[](#environment)

Boot:

```
vagrant up

```

Enter virtual machine:

```
vagrant ssh

```

Run tests:

```
cd /vagrant
vendor/bin/phpunit src/Test/

```

### Build targets

[](#build-targets)

```
vagrant@andreas-weber:/vagrant$ ant
Buildfile: /vagrant/build.xml

help:
     [echo]
     [echo] The following commands are available:
     [echo]
     [echo] |   +++ Build +++
     [echo] |-- build                (Run the build)
     [echo] |   |-- dependencies     (Install dependencies)
     [echo] |   |-- tests            (Lint all files and run tests)
     [echo] |   |-- metrics          (Generate quality metrics)
     [echo] |-- cleanup              (Cleanup the build directory)
     [echo] |
     [echo] |   +++ Composer +++
     [echo] |-- composer             -> composer-download, composer-install
     [echo] |-- composer-download    (Downloads composer.phar to project)
     [echo] |-- composer-install     (Install all dependencies)
     [echo] |
     [echo] |   +++ Testing +++
     [echo] |-- phpunit              -> phpunit-full
     [echo] |-- phpunit-tests        (Run unit tests)
     [echo] |-- phpunit-full         (Run unit tests and generate code coverage report / logs)
     [echo] |
     [echo] |   +++ Metrics +++
     [echo] |-- coverage             (Show code coverage metric)
     [echo] |-- phploc               (Show lines of code metric)
     [echo] |-- qa                   (Run quality assurance tools)
     [echo] |-- |-- phpcpd           (Show copy paste metric)
     [echo] |-- |-- phpcs            (Show code sniffer metric)
     [echo] |-- |-- phpmd            (Show mess detector metric)
     [echo] |
     [echo] |   +++ Metric Reports +++
     [echo] |-- phploc-report        (Generate lines of code metric report)
     [echo] |-- phpcpd-report        (Generate copy paste metric report)
     [echo] |-- phpcs-report         (Generate code sniffer metric report)
     [echo] |-- phpmd-report         (Generate mess detector metric report)
     [echo] |
     [echo] |   +++ Tools +++
     [echo] |-- lint                 (Lint all php files)
     [echo]

```

Attributions
------------

[](#attributions)

Thanks to [Sebastian Bergmann](https://gist.github.com/sebastianbergmann) for his gist [merge-phpunit-xml.php](https://gist.github.com/sebastianbergmann/4405658), which was the base and inspired me to develop this library.

Thoughts
--------

[](#thoughts)

Pull requests are highly appreciated. Built with love. Hope you'll enjoy.. :-)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

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

Unknown

Total

1

Last Release

974d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/077206ec25224ef22d3151c8d6803444c5a0dfb5c9977d8e28d1da3c51ae0534?d=identicon)[sinamt](/maintainers/sinamt)

---

Top Contributors

[![andreaskweber](https://avatars.githubusercontent.com/u/2075176?v=4)](https://github.com/andreaskweber "andreaskweber (29 commits)")[![sakharovmaksim](https://avatars.githubusercontent.com/u/17139166?v=4)](https://github.com/sakharovmaksim "sakharovmaksim (11 commits)")[![sinamt](https://avatars.githubusercontent.com/u/29794?v=4)](https://github.com/sinamt "sinamt (4 commits)")[![albertodimaio3](https://avatars.githubusercontent.com/u/58423575?v=4)](https://github.com/albertodimaio3 "albertodimaio3 (2 commits)")[![tarlepp](https://avatars.githubusercontent.com/u/595561?v=4)](https://github.com/tarlepp "tarlepp (1 commits)")[![tomzx](https://avatars.githubusercontent.com/u/188960?v=4)](https://github.com/tomzx "tomzx (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/99designs-php-junit-merge/health.svg)

```
[![Health](https://phpackages.com/badges/99designs-php-junit-merge/health.svg)](https://phpackages.com/packages/99designs-php-junit-merge)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M563](/packages/symfony-maker-bundle)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M81](/packages/symplify-monorepo-builder)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[shyim/danger-php

Port of danger to PHP

8544.9k](/packages/shyim-danger-php)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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