Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

"logIncompleteSkipped" option is missing since version 6.0 #2779

Closed
more7dev opened this issue Sep 20, 2017 · 6 comments
Closed

"logIncompleteSkipped" option is missing since version 6.0 #2779

more7dev opened this issue Sep 20, 2017 · 6 comments

Comments

@more7dev
Copy link

Q A
PHPUnit version 6.x
PHP version 7.1
Installation Method Composer

In current manual there is an option described, named "logIncompleteSkipped".

Prior to version 6.0 it was present in Configuration.php file.
Since 6.0 it disappeared from Configuration.php and setting this option has no effect on jUnit output xml.

configuration.xml:

<logging>
    <log type="junit" target="junit.xml" logIncompleteSkipped="false" />
</logging>

junit.xml - information about skipped tests is still present:

<testcase name="example" class="Example" classname="Example" file="Example.php" line="48" assertions="0" time="0.688695">
    <skipped/>
</testcase>`
@sebastianbergmann
Copy link
Owner

This should have been reported on the phpunit-documentation project.

I am sorry that I have to close this issue here as GitHub does not support moving issues from one project to another.

@more7dev
Copy link
Author

I didn`t know if this option had been intentionally removed or it is just a bug.
In the changelog there is no mention about removal.

It is a pity that you decided to remove it. In my opinion it is sometimes useful, in my case for example, Jenkins has problem with parsing <skipped/> tag and removing it from output would solve the problem until Jenkins has this issue fixed. Without this option, resolution will be a bit more complicated.

@sebastianbergmann
Copy link
Owner

The ChangeLog reads "The logfile format generated using the --log-junit option and the configuration directive has been updated to match the current format used by JUnit. Due to this change you may need to update how your continuous integration server processes test result logfiles generated by PHPUnit."

@aistis-
Copy link

aistis- commented Mar 28, 2018

Ran into the same problem. @more7dev did you manage to find a workaround for it?

@more7dev
Copy link
Author

more7dev commented Mar 28, 2018

My workaround is to remove <skipped/> tags from generated junit.xml, so that Jenkins can successfully parse them.

I do it in my CI script, after running phpunit:
sed -i -e 's/<skipped\/>//g' "junit.xml"

I see corresponding Jenkins issue still not fixed...

@aistis-
Copy link

aistis- commented Mar 28, 2018

@more7dev worked great 👍 thanks

However, now junit handler seems working! Just replace phpunit handler by junit handler.

example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants