Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
JENKINS-19353 - Exception error message newlines are escaped
Added a new test as well for testing both the test description and exception messages
- Loading branch information
Showing
5 changed files
with
105 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/test/resources/testng-xml-multiline-exp-msg-and-descp.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<testng-results> | ||
<reporter-output> | ||
</reporter-output> | ||
<suite name="Multiline Exception message and Test Description" duration-ms="44881" started-at="2011-05-05T00:59:00Z" finished-at="2011-05-05T00:59:45Z"> | ||
<groups> | ||
</groups> | ||
<test name="Multiline Exception message and Test Description test" duration-ms="44881" started-at="2011-05-05T00:59:00Z" finished-at="2011-05-05T00:59:45Z"> | ||
<class name="com.fakepkg.test.FoobarTests"> | ||
<test-method status="PASS" signature="setUp()" name="setUp" is-config="true" duration-ms="1" started-at="2011-05-05T00:59:42Z" finished-at="2011-05-05T00:59:42Z"> | ||
</test-method> | ||
<test-method status="FAIL" signature="test()" name="test" description="This description has | ||
multiple lines. | ||
Really it does" duration-ms="3043" started-at="2011-05-05T00:59:42Z" finished-at="2011-05-05T00:59:44Z"> | ||
<exception class="java.lang.AssertionError"> | ||
<message> | ||
<![CDATA[Test did not generate the expected output. | ||
1. See files for details (this should be a separate line). | ||
2. Do something to fix it.(this should be a separate line).]]> | ||
</message> | ||
<full-stacktrace> | ||
<![CDATA[java.lang.AssertionError: Test did not generate the expected output. | ||
1. See files for details (this should be a separate line). | ||
2. Do something to fix it.(this should be a separate line). | ||
at org.testng.Assert.fail(Assert.java:89) | ||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | ||
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) | ||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) | ||
at java.lang.reflect.Method.invoke(Method.java:597) | ||
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74) | ||
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673) | ||
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846) | ||
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170) | ||
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) | ||
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) | ||
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) | ||
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) | ||
at java.lang.Thread.run(Thread.java:662) | ||
]]> | ||
</full-stacktrace> | ||
</exception> | ||
</test-method> | ||
</class> | ||
</test> | ||
</suite> | ||
</testng-results> |