Giter Club home page Giter Club logo

phpunit-merger's People

Contributors

denizsokullu avatar ichhabrecht avatar tomasnorre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phpunit-merger's Issues

Merge of junit logs is not working.

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.

ParseError: syntax error, unexpected 'version'

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!

Add support for php-code-coverage 8

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?

Enhancement: Add option for project root

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.

Any plan to upgrade symfony/console version ?

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 ?

Support output for multiple test suites

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.

See sebastianbergmann/phpunit#2784

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.