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

avoid adding null comment in json reporter #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Atari361
Copy link

@Atari361 Atari361 commented Apr 26, 2024

org.testng.ITestResult#getThrowable sometimes can have detailMessage=null, and this results in json-report.json having "comment":null and later a rejection from API when importing results via '/api/v2/import/execution' (Xray Cloud).

TestNG test example that generates detailMessage=null:

@Test
@XrayTest(key = "EZ-76901")
public void testFailed() {
    assert false;
}

This PR adds an extra detailMessage != null check to favoid adding null comment.

Copy link

sonarcloud bot commented Apr 26, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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.

None yet

1 participant