当我运行TestNG测试时,我得到以下截断输出的失败测试:
Failed tests: retrievedDataFromService(com.mydomain.ServiceTest): The returned data is not correct:(..)
来自Assert.fail()的实际字符串是这样的:
StringBuilder msg = new StringBuilder("The returned data is not correct:");
msg.append("\n expected = ");
msg.append("<xml>some data</xml>");
msg.append("\n was = ");
msg.append("<xml>some other data</xml>");
如果我从邮件中删除换行符,则会显示所有内容:
Failed tests: retrievedDataFromService(com.mydomain.ServiceTest): The returned data is not correct: expected = <xml>some data</xml> was = <xml>some other data</xml>
在“失败的测试”输出中有没有办法让TestNG显示换行符?