---
title: "[Xray] Import API fails to import results"
canonical: "https://docs.getxray.app/space/ProductKB/46268599/%5BXray%5D%20Import%20API%20fails%20to%20import%20results"
format: markdown
---
## 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:

> ℹ️ **NUnit errors**
> ℹ️ 
> ℹ️ 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

*<u>Validator:</u>* [https://www.freeformatter.com/xml-validator-xsd.html](https://www.freeformatter.com/xml-validator-xsd.html)


> ℹ️ **NUnit**
> ℹ️ 
> ℹ️ <u>*Schema*</u>: [https://nunit.org/files/testresult_schema_25.txt](https://nunit.org/files/testresult_schema_25.txt)
> ℹ️ 
> ℹ️ (source: [https://docs.nunit.org/articles/nunit/technical-notes/usage/XML-Formats.html](https://docs.nunit.org/articles/nunit/technical-notes/usage/XML-Formats.html))


### JSON Formats

*<u>Validator:</u>* [https://www.jsonschemavalidator.net/](https://www.jsonschemavalidator.net/)


> ℹ️ **Xray format**
> ℹ️ 
> ℹ️ *<u>Schema:</u>* [Import Execution Results#XrayJSONSchema](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301406948/Import+Execution+Results#ImportExecutionResults-XrayJSONSchema)

> ℹ️ **Cucumber**
> ℹ️ 
> ℹ️ <u>*Schema:*</u> [https://github.com/cucumber/cucumber-json-schema/blob/main/schema.json](https://github.com/cucumber/cucumber-json-schema/blob/main/schema.json)
> ℹ️ 
> ℹ️ (source: [https://github.com/cucumber/cucumber-json-schema](https://github.com/cucumber/cucumber-json-schema))

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


## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** | > Macro (jira) |
> | --- | --- |