org_heigl / junitdiff
Create a diff between 2 junit-files
Requires
- php: ^5.5||^7.0
- org_heigl/trait-iterator: ^1.0
- symfony/console: ^3.1
Requires (Dev)
- mockery/mockery: ^0.9.5
- phpunit/phpunit: ^4.8||^5.4
- dev-master
- 0.5.0
- 0.4.0
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- dev-dependabot/add-v2-config-file
- dev-feature/adaptReadmeToPhar
- dev-feature/fixIssues
- dev-hotfix/removeSomeTechDept
- dev-feature/addCoveralls
- dev-feature/automateTagging
- dev-hotfix/validateInputFiles
- dev-feature/addVersionString
This package is auto-updated.
Last update: 2024-11-29 04:57:56 UTC
README
JUnitDiff
A small CLI to check which tests have changed between test runs.
This software is in an early alpha-stage. PRs and improvement-ideas are more than welcome.
Installation
JUnitDiff can be installed in one of the two following ways:
composer.
Run this in your projects root-folder to include JUnitDiff as development-dependency
$ composer global require --dev org_heigl/junitdiff
Phar
Download the latest release as PHAR-file from the release-page.
The releases are signed using the JUNitDiff GPG-Key with ID AE11B9CEBADB342A and
Fingerprint A84C BFAC 7147 9C6C E37E FF47 AE11 B9CE BADB 342A
.
You can verify the phar-file using these commands:
gpg --keyserver pgp.mit.edu --recv-key 0xAE11B9CEBADB342A gpg --fingerprint AE11B9CEBADB342A gpg --verify junitdiff.phar.asc junitdiff.phar
Feel free to rename the file junitdiff.phar
to junitdiff
for easier
execution.
Usage
JUnitDiff compares two JUnit log files which can be generated with e.g. phpunit
.
$ phpunit --log-junit logfile.xml
When you have two JUnit log files from two different test runs available you can check which tests have changed between those with junitdiff
.
$ php junitdiff.diff compare </path/to/first/logfile> </path/to/last/logfile>
An example output might be:
[o] Test MyTest::testStoringIdWorks changed from success to error [+] New Test MyTest::testStoringIdWorksBetter with data set #7 [-] Removed Test MyTest::testStoringIdWorksBest
Caveat
PHPUnit adds information about skipped or ignored tests into the JUnit-lof file starting with PHPUnit 6.0! So files created with a previous version do not provide information about skipped or ignored tests. (Thanks to Sebastian Bergmann for that info!) Until Issue 3 is resolved they will not be shown in the output! But as they are ignored or skipped and therefore not executed they are just like not existing tests at all, so it shouldn't be an issue.