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

Mutliline values for traceback or stdout/stderr are not properly indented #47

Open
memoselyk opened this issue Oct 4, 2017 · 1 comment

Comments

@memoselyk
Copy link

I have observed this issue with junit-xml==1.8 and Jenkins 2.46.3.
In case it matters I'm using xUnit plugin to publish Junit results.

Steps to reproduce

Create a test case with a multi-line output or traceback, e.g.

stdout = "line1\nline2"
traceback = "line1\nline2"
tc = TestCase(name=name, classname=classname, stdout=stdout)
tc.add_error_info(output=traceback)

Expected behavior

In the test case details displayed in Jenkins the multi-line values are shown like

line1
line2

Based on the formatting of test cases in the xunit plugin, I assume the proper tag to be generated should be:

			<system-out>
				line1
                                line2
			</system-out>

Actual behavior

The first line has an extra indentation:

            line1
line2

That is caused by the indentation given to text of the relevant tag:

			<system-out>
				line1
line2
			</system-out>
@brianebeyer
Copy link
Contributor

Thanks @memoselyk - please submit a PR with tests if you'd like this behavior to change

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

2 participants