Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support for logging section in phpunit.xml #72

Closed
aik099 opened this issue Dec 8, 2013 · 4 comments · Fixed by #514
Closed

Support for logging section in phpunit.xml #72

aik099 opened this issue Dec 8, 2013 · 4 comments · Fixed by #514

Comments

@aik099
Copy link

aik099 commented Dec 8, 2013

I know, that according to docs the logging section (see http://phpunit.de/manual/3.7/en/appendixes.configuration.html) of phpunit.xml file isn't supported.

Example:

<logging>
    <log type="coverage-html" target="build/coverage" title="BankAccount"
        charset="UTF-8" yui="true" highlight="true"
        lowUpperBound="35" highLowerBound="70"/>
</logging>

It would be great if at least coverage-related logging would be supported as well to compliment --coverage-html, --coverage-clover and --coverage-php command-line options.

@aik099
Copy link
Author

aik099 commented Dec 12, 2013

I've looked in the code, but I can't seem to find the a link between parameters read from phpunit.xml and actual PHPUnit process invocation.

Also is phpunit invoked via command-line or via a special runner, where you can set even options, that can't be set from phpunit ... command line call?

@julianseeger
Copy link
Contributor

When I implemented the coverage options, I didn't even think about the phpunit.xml, so there won't be any link between the logging-section in the phpunit.xml and the coverage-options that paratest uses. But it would make sense, I agree ;)

Paratest invokes phpunit from the normal command line interface (so no fancy private options ^^) but it should nevertheless be possible for paratest to parse the phpunit.xml, extract the coverage-entries and handle them just like "paratest --coverage-html" etc. ... I guess

@aik099
Copy link
Author

aik099 commented Dec 13, 2013

@julianseeger , do you pass --configuration option as well to each of phpunits, that are executed in parallel? Since command-line options override similar options from phpunit.xml, then you can safely do it.

This way coverage type will be specified in command-line, but coverage options (e.g. highlight/lowUpperBound/etc) will be used from phpunit.xml.

@julianseeger
Copy link
Contributor

I don't know if Paratest passes --configuration.
You can get the command in src/ParaTest/Runners/PHPUnit/ExecutableTest.php at Line 136. $command should be the full command executed on the command line to run the test. Insert an echo there and you should get the info.
I would have done it, but I'm lacking the time currently.

# for free to join this conversation on GitHub. Already have an account? # to comment
Development

Successfully merging a pull request may close this issue.

3 participants