Problem

When importing execution results from automated test frameworks (Xray, Cucumber, Behave, JUnit, TestNG, NUnit, xUnit, Robot), the upload does not work and may return some errors like the ones below:

java.lang.NullPointerException
at com.xpandit.raven.service.executionresult.converter.framework.impl.NUnitExecutionResultBeanConverterImpl.b(Unknown Source)
...
at com.xpandit.raven.service.executionresult.converter.impl.ExecutionResultBeanConverterServiceImpl.b(Unknown Source)
at com.xpandit.raven.service.executionresult.j.a(Unknown Source)
at com.xpandit.raven.service.executionresult.impl.ImportExecutionResultsServiceImpl.a(Unknown Source)
...
at com.xpandit.raven.rest.api.v1.a.a.a(Unknown Source)
at com.xpandit.raven.rest.api.v1.a.b.e.a(Unknown Source)


Troubleshoot

One of the main causes and the first thing to test is the execution report and ensure it is correctly generated.

And a quick way to ensure the execution report is correct, its to validate it against the respective schema.

Below there a link to that format validator and to XML schemas.


XML Formats

Validator: https://www.freeformatter.com/xml-validator-xsd.html


Schemahttps://nunit.org/files/testresult_schema_25.txt

(source: https://docs.nunit.org/articles/nunit/technical-notes/usage/XML-Formats.html)


JSON Formats

Validator: https://www.jsonschemavalidator.net/


Schema: Import Execution Results#XrayJSONSchema

Schema: https://github.com/cucumber/cucumber-json-schema/blob/main/schema.json

(source: https://github.com/cucumber/cucumber-json-schema)

Always ensure to use the correct schema for the format being tested. Otherwise, it may return incorrect results!


Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues