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

New line characters are removed from stack traces in testng-results.xml #1659

Closed
1 of 7 tasks
katedreaper opened this issue Jan 2, 2018 · 5 comments · Fixed by #1663
Closed
1 of 7 tasks

New line characters are removed from stack traces in testng-results.xml #1659

katedreaper opened this issue Jan 2, 2018 · 5 comments · Fixed by #1663

Comments

@katedreaper
Copy link

katedreaper commented Jan 2, 2018

TestNG Version

6.13.1

Expected behavior

Stack trace in testng-results.xml contains new line characters.

Actual behavior

New line characters are removed from stack traces.

Is the issue reproducible on runner?

  • Shell
  • Maven
  • Gradle
  • Ant
  • Eclipse
  • IntelliJ
  • NetBeans

Test case sample

    @Test
    public void test()
    {
        Assert.fail( "failed" );
    }

Results in 6.12

            <full-stacktrace>
              <![CDATA[java.lang.AssertionError: failed
	at Tester.test(Tester.java:12)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:498)
]]>
            </full-stacktrace>

Results in 6.13

            <full-stacktrace>
              <![CDATA[java.lang.AssertionError: failedat Tester.test(Tester.java:12)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at java.lang.reflect.Method.invoke(Method.java:498)]]>
            </full-stacktrace>
@krmahadevan
Copy link
Member

@katedreaper - Can you please let us know as to in which version was it exactly broken for you ? [ There were a lot of versions released between 6.9.11 and 6.13.1

@katedreaper
Copy link
Author

Sorry. It was broken in 6.13.

@nadavcaspi
Copy link

this is the commit that made the behavior change
b5ff38f#diff-45d9027f05908b313ec3a948beaeefde

@dantran
Copy link

dantran commented Feb 1, 2018

can we have a new release to pick up this fix? it is very annoying looking at stack trace in one line :-)

@krmahadevan
Copy link
Member

@dantran - @cbeust is working on releasing TestNG soon.

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

Successfully merging a pull request may close this issue.

5 participants