PHPackages                             alexxed/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. [Testing &amp; Quality](/categories/testing)
4. /
5. alexxed/php-junit-merge

ActiveLibrary[Testing &amp; Quality](/categories/testing)

alexxed/php-junit-merge
=======================

PHP-Unit J-Unit XML File Merger

1.0.9(1y ago)040MITPHPPHP &gt;=8.0

Since Jul 24Pushed 1y agoCompare

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

READMEChangelog (2)Dependencies (7)Versions (3)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

26

—

LowBetter than 43% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63% 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 ~0 days

Total

2

Last Release

654d ago

PHP version history (2 changes)1.0.8PHP &gt;=5.6

1.0.9PHP &gt;=8.0

### Community

Maintainers

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

---

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)")[![albertodimaio3](https://avatars.githubusercontent.com/u/58423575?v=4)](https://github.com/albertodimaio3 "albertodimaio3 (2 commits)")[![alexxed](https://avatars.githubusercontent.com/u/2104927?v=4)](https://github.com/alexxed "alexxed (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/alexxed-php-junit-merge/health.svg)

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

###  Alternatives

[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[phan/phan

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[codeception/codeception

All-in-one PHP Testing Framework

4.9k86.2M2.9k](/packages/codeception-codeception)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k15.5M901](/packages/phpro-grumphp)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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