Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,642,205
Community Members
 
Community Events
196
Community Groups

XRay Runtime Exception for Import Multipart using Xray JSON format

Edited

I'm currently getting an error, specifically a Java Runtime Error, "An exception occurred while handling a v2 REST API request: java.lang.RuntimeException", when trying to perform an import multipart operation using the XRay JSON multipart format/endpoint.

(This is to create NEW test items as well, by the way, not already existing ones. We currently can't use JUnit as we have a custom system using test ordering with JUnit, so we have multiple "tests" within each test class, and we need Jira/Xray Test items created for each test class, not test method)

We are on Xray v5.1.4, and have a custom field on our test items. Here is the JSON formatting for both files:

INFO JSON FILE (testexec_info.json):

{

    "fields": {
    "project": {
        "key": "MHV"
    },
    "summary": "MHV - Test Execution for Jira Automation Testing 1",
    "description": "Creating of an automated test using the Jira REST API",
    "issuetype": {
        "id": "11600"
    },
    "customfield_15400": { "value" : "MHV Test Automation"}
    }
}
TEST INFO JSON FILE (file.json):
{
    "testExecutionKey": "MHV-24977",
    "info": {
        "summary": "MHV Automated Test Dec 1"
    },
    "tests": [
        {
            "start": "2014-08-30T11:47:35+01:00",
            "finish": "2014-08-30T11:50:56+01:00",
            "status": "PASS",
            "customFields": [
                {
                    "id": 15400,
                    "value": [
                        "MHV Test Automation"
                    ]
                }
            ],
            "testInfo": {
                "summary": "MHV Automated Test creation - Dec 1",
                "testType": "Generic",
                "projectKey": "MHV",
                "definition": "Test definition"
            }
        }
    ]
}

When sending this in postman, I receive the runtime exception error. I'm trying to get more information on if this formatting may be wrong, or honestly any answers at all as to why this API call isn't working. I've followed the documentation as best I can AFAIK, and believe I have it formatted correctly, but for some reason it's still failing. I was getting the Null Pointer Error, but that seems to have been changed, and now when I change the test from Generic to Automated, I get this response:

 

    "testExecIssue": {
        "id": "1445836",
        "key": "MHV-24977",
    },
    "testIssues": {
        "error": [
            null
        ]
    },
    "infoMessages": []
}


Again, our XRay version is 5.1.4.

Also, I've attempted to use the non-multipart endpoint, however I get a response stating that the value for the custom field that I'm providing is required, so I'm unsure of where the failure is for the XRay plugin to pickup on the data I'm sending and why it's ignoring the custom field value. Here's the link to my original post, still unanswered as well:

https://community.atlassian.com/t5/Marketplace-Apps-Integrations/XRAY-Import-Multipart-Null-Pointer-Error/qaq-p/1855266#M90693

 

 

1 answer

0 votes
Rogério Paiva - Xray Xporter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Dec 16, 2021

Hi @George Goslin Jr_ 

It would be necessary to have more information about how the request is being made and the error messages returned.

It is best to contact Xray Support (http://Xraysupport.getXray.app) to share your configuration so that the support team can investigate further.

Thank you.

Kind regards,
Rogerio Paiva [Xray Support Team]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events