Skip to content

Handle Test failures with Exceptions without message#183

Merged
baev merged 3 commits into
allure-framework:masterfrom
letsrokk:handle-exceptions-without-message
Feb 11, 2018
Merged

Handle Test failures with Exceptions without message#183
baev merged 3 commits into
allure-framework:masterfrom
letsrokk:handle-exceptions-without-message

Conversation

@letsrokk

@letsrokk letsrokk commented Jan 19, 2018

Copy link
Copy Markdown
Contributor

//: # (
. Thank you so much for sending us a pull request!
.
. Make sure you have a clear name for your pull request.
. The name should start with a capital letter and no dot is required in the end of the sentence.
. To link the request with isses use the following notation: (fixes #123, fixes #321)
.
. An example of good pull request names:
. - Add Russian translation (fixes #123)
. - Add an ability to disable default plugins
. - Support emoji in test descriptions
)

Context

Whenever test execution fails with exception without message, e.g.

@Test
public void testMethodWithException() throws Exception {
	throw new Exception();
}

or when test fails with NullPointerException, we encounter issues with Categories tab showing 404 Not Found error (jenkinsci/allure-plugin#193) and test page in report lacking information on exception
screen shot 2018-01-19 at 11 34 20

This pull request suggests to use Throwable class name in case of Throwable message being empty (null)

screen shot 2018-01-19 at 11 46 55

I also added new test to allure-testng adapter covering this case

Checklist

@letsrokk letsrokk changed the title Handle exceptions without message Handle Test failures with Exceptions without message Jan 19, 2018
@simple-elf

Copy link
Copy Markdown
Contributor

Also needed tests for junit

@baev baev merged commit 8abfd9c into allure-framework:master Feb 11, 2018
@eroshenkoam

Copy link
Copy Markdown
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Enum class cast exception when using varargs generic constant parameter in step

4 participants