nimut / phpunit-merger Goto Github PK
View Code? Open in Web Editor NEWMerge multiple PHPUnit reports into one file
Merge multiple PHPUnit reports into one file
Hi, thanks for the package and for sharing it.
I have a problem when I try to merge junit logs that where generate in .xml files. Command that I execute php -d memory_limit=512M vendor/bin/phpunit-merger log locallog merged-log.xml
as a result I have the following xml file:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites/>
Thank you.
it seems that https://github.com/sebastianbergmann/phpcov also provides an option to merge coverage reports:
https://github.com/sebastianbergmann/phpcov#merging-exported-php-code-coverage-objects-stored-in-cov-files
How is then this package different from phpcov?
I'm getting an error when I try to run the following command:
phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit-merger coverage ./coverage
ParseError: syntax error, unexpected 'version' (T_STRING) in /var/www/src/coverage/phpunit-coverage-v2-groups.xml:1
Stack trace:
#0 /var/www/src/vendor/symfony/console/Command/Command.php(299): Nimut\PhpunitMerger\Command\CoverageCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /var/www/src/vendor/symfony/console/Application.php(978): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/src/vendor/symfony/console/Application.php(295): Symfony\Component\Console\Application->doRunCommand(Object(Nimut\PhpunitMerger\Command\CoverageCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/src/vendor/symfony/console/Application.php(167): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/src/vendor/nimut/phpunit-merger/bin/phpunit-merger(29): Symfony\Component\Console\Application->run()
#5 {main}
I have multiple .xml files generated from phpunit coverage. I'm not running with xdebug mode, I use phpdbg:
phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit modules/ --configuration phpunit.xml --coverage-clover ./coverage/phpunit-coverage-v2-groups.xml --coverage-html ./public/coverage/
I've tried with xdebug without phpdbg and I get the same error. Also tried with php ^7.4 and phpunit ^9
My current php version is ^7.3 and phpunit ^8.5.
Can anyone help me here? Thanks!
I am running into an issue with this package since it requires a php-code-coverage less than 8 and phpunit 9 updates php-code-coverage as well.
I can help making a PR for this. Anything I should take into account when creating the PR?
PHPUnit is available in version 9.0 since the 7th of February 2020.
It would be great to allow merge of multiple PHP CodeCoverage object into HTML facade
In our current setup, our coverage reports are generated from different systems that use a different absolute path. When merged into a single report, the results don't work out.
Feature request; Add some option to identify the project's root between the coverage reports so that the merged data is relatively the same.
Cannot use phpunit-merger using php ^8.1
Any plan to support php newer version ?
It would be nice to allow the merging command to create and output multiple type of reports.
Sadly, this package can't be installed on a fresh Symfony 5.4 due to a conflict of version for the symfony/console dependency.
While Symfony 5.4 require to use symfony/console 6+, phpunit-merger require in other hand to be lower than 6.
Any plan to support newer version ?
When using this tool to merge coverage reports, you cannot specify the lowUpperBound
and highLowerBound
options which are used to customise this report. The tool should add some (optional) command line parameters to be able to set these values
ATM reports for multiple test suites are not supported.
With a single test suite the --log-junit
output of PHPUnit looks like this:
<testsuites>
<testsuite name="Foo" tests="10">
<!-- ... -->
</testsuite>
</testsuites>
However, with multiple test suites PHPUnit adds another grouping <testsuite>
element:
<testsuites>
<testsuite name="" tests="15">
<testsuite name="Foo" tests="10">
<!-- ... -->
</testsuite>
<testsuite name="Bar" tests="5">
<!-- ... -->
</testsuite>
</testsuite>
</testsuites>
Since the LogCommand
drops all test suites with an empty name this leads to all test suites being dropped.
What the title says
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.