How to set testExecutionKey for Cucumber multipart import using Jira Cloud

Vera Lankes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2024

Hey guys, 

I want to import the test results of our UI tests to the referring Jira Test Execution-Ticket using the v2 Cucumber Multipart API (POST /api/v2/import/execution/cucumber/multipart). Authentication and uploading the results is already working; but instead of creating a new Test Execution with the mentioned test results, I'd like to update the already existing one. I tried to set the "testExecutionKey" on various parts of my results.json (following you see my latest attempt), but unfortunately new tickets are created nevertheless.

Can anybody please give me a hint, where to add this piece of information?
Thanks in advance!

results.json:

[
{
"testExecutionKey": "XXX-15061",
"line": 2,
"elements": [
{
"start_timestamp": "2024-06-11T14:58:24.131Z",
"before": [
{
"result": {
"duration": 34788000,
"status": "passed"
},
"match": {
"location": "de.xxx.uitests.hooks.Hook.doHookThings(io.cucumber.java.Scenario)"
}
}
],
"line": 6,
"name": "Add an ABC",
"description": "",
"id": "abc-history;add-an-abc",
"after": [
{
"result": {
"duration": 49000,
"status": "passed"
},
"match": {
"location": "de.xxx.uitests.hooks.AnotherHook.doSthAgain()"
}
}
],
"type": "scenario",
"keyword": "Scenario",
"steps": [
{
"result": {
"duration": 20451903000,
"status": "passed"
},
"line": 7,
"name": "I opened the Start Screen",
"match": {
"location": "de.xxx.uitests.steps.AbcSteps.iOpenTheStartScreen()"
},
"keyword": "Given "
},
{
"result": {
"duration": 9873579000,
"status": "passed"
},
"line": 8,
"name": "I opened the ABC Overview",
"match": {
"location": "de.xxx.uitests.steps.AbcSteps.iOpenedTheAbcOverview()"
},
"keyword": "And "
},
{
"result": {
"duration": 6171407000,
"status": "passed"
},
"line": 9,
"name": "I add a new ABC",
"match": {
"arguments": [
{
"val": "2021",
"offset": 41
}
],
"location": "de.xxx.uitests.steps.AbcSteps.iAddANewAbc()"
},
"keyword": "When "
},
{
"result": {
"duration": 761038000,
"status": "passed"
},
"line": 10,
"name": "the ABC is added successfully",
"match": {
"location": "de.xxx.uitests.steps.AbcSteps.theAbcIsAddedSuccessfully()"
},
"keyword": "Then "
}
],
"tags": [
{
"name": "@abcHistory"
},
{
"name": "@XXX-8"
}
]
},
{
"start_timestamp": "2024-06-11T14:59:08.469Z",
"before": [
{
"result": {
"duration": 1588000,
"status": "passed"
},
"match": {
"location": "de.xxx.uitests.hooks.SomeHook.setSth(io.cucumber.java.Scenario)"
}
}
],
"line": 13,
"name": "ABC is added to the View",
"description": "",
"id": "abc-history;abc-is-added-to-the-view",
"after": [
{
"result": {
"duration": 59888000,
"status": "passed"
},
"match": {
"location": "de.xxx.uitests.hooks.ExistingHook.gotToDoSth()"
}
}
],
"type": "scenario",
"keyword": "Scenario",
"steps": [
{
"result": {
"error_message": "Another Error Message",
"duration": 9632170000,
"status": "failed"
},
"line": 14,
"name": "I visited the ABC",
"match": {
"arguments": [
{
"val": "public",
"offset": 29
}
],
"location": "de.xxx.uitests.steps.AbcSteps.iVisitTheAbc(de.xxx.uitests.testdata.abc.ABC)"
},
"keyword": "Given "
},
{
"result": {
"duration": 34000,
"status": "skipped"
},
"line": 15,
"name": "I open the ABC",
"match": {
"location": "de.xxx.uitests.steps.AbcSteps.iOpenTheAbc()"
},
"keyword": "When "
},
{
"result": {
"duration": 9000,
"status": "skipped"
},
"line": 16,
"name": "the ABC is displayed",
"match": {
"location": "de.xxx.uitests.steps.ABCSteps.theAbcIsDisplayed()"
},
"keyword": "Then "
}
],
"tags": [
{
"name": "@abc"
},
{
"name": "@XXX-9"
}
]
}
],
"name": "ABC",
"description": " As a user, I want to learn about ABC's.",
"id": "abc",
"keyword": "Feature",
"uri": "classpath:features/test1/abc/learnAbc.feature",
"tags": [
{
"name": "@abc",
"type": "Tag",
"location": {
"line": 1,
"column": 1
}
},
{
"name": "@test1",
"type": "Tag",
"location": {
"line": 1,
"column": 14
}
}
]
}
]

 

info.json:

{
"fields": {
"project": {
"id": "11111"
},
"summary": "Automated Test Execution | Android, OS14",
"issuetype": {
"id": "11112"
},
"components": [
{
"name": "Android"
}
]
}
}

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events