You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi, i m using the below multipart endpoint to import my cucumber json results into xray that should create a new test execution and link it to the specified testplan and project keys in the info file below. after many tries i ended up by receiving the bellow error and i do not know what it is missing here:
{"error":"Error creating Test Execution - expected Object"}
your help is very appreciated.
1) curl -H "Content-Type: multipart/form-data" \
-X POST -F info=@issueFields.json \
-F results=@build/json_cucumber.json \
-H "Authorization: Bearer $token" https://xray.cloud.xpand-it.com/api/v2/import/execution/cucumber/multipart
2) info file is :
{
"fields": {
"project": {
"key": "DEMO"
},
"summary": "Brand new Test execution",
"issuetype": {
"name":"Test Execution"
},
"description": "first test execution",
"versions": ["REL-2021.02.0"],
"fixVersions": ["REL-2021.02.0"]
},
"xrayFields": {
"testPlanKey": "TR-5202",
"environments": ["QA2"]
}
}
3) results in cucumber json format :
[
{
"line": 2,
"elements": [
{
"start_timestamp": "2021-01-31T19:16:00.125Z",
"before": [
{
"result": {
"duration": 64367477818,
"status": "passed"
},
"match": {
"location": "TestSetUpHook.setup(Scenario)"
}
}
],
"line": 46,
"name": "employee submits an approved request to create a punch",
"description": "",
"id": "employee-timecard-edits-(create-/-update)-requests-are-auto-approved;employee-submits-an-approved-request-to-create-a-punch",
"after": [
{
"output": [
"\n\n ************************************************************************ \n"
],
"result": {
"duration": 3546992735,
"status": "passed"
},
"match": {
"location": "TestSetUpHook.cleanUp(Scenario)"
}
}
],
"type": "scenario",
"keyword": "Scenario",
"steps": [
{
"result": {
"error_message": "java.lang.NullPointerException\n\tat com.company.service.common.EmployeeCommonRequestService.getEmployeeEmail(EmployeeCommonRequestService.java:36)\n\tat com.company.service.common.EmployeeCommonRequestService$$FastClassBySpringCGLIB$$edef1353.invoke(\u003cgenerated\u003e)\n\tat org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:747)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:91)\n\tat org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)\n\tat org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:164)\n\tat org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:118)\n\tat org.springframework.retry.annotation.AnnotationAwareRetryOperationsInterceptor.invoke(AnnotationAwareRetryOperationsInterceptor.java:153)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)\n\tat com.company.service.common.EmployeeCommonRequestService$$EnhancerBySpringCGLIB$$d6a8a6ae.getEmployeeEmail(\u003cgenerated\u003e)\n\tat com.company.stepdefinition.TimeAndAttendanceStepDefinition.loginAsDefaultUser(TimeAndAttendanceStepDefinition.java:85)\n\tat com.company.stepdefinition.TimeAndAttendanceStepDefinition.createOnlinePunchFromMontrealStore(TimeAndAttendanceStepDefinition.java:36)\n\tat ✽.employee_bart submits an approval request to create a online punch for SHIFT_START from montreal store at 12:00(file:src/test/java/com/company/feature/timeCards/1_TR-4768.feature:47)\n",
"duration": 7679334,
"status": "failed"
},
"line": 47,
"name": "employee_bart submits an approval request to create a online punch for SHIFT_START from montreal store at 12:00",
"match": {
"arguments": [
{
"val": "employee_bart submits an approval request to",
"offset": 0
},
{
"val": "SHIFT_START",
"offset": 71
},
{
"val": "12:00",
"offset": 106
}
],
"location": "TimeAndAttendanceStepDefinition.createOnlinePunchFromMontrealStore(String,String,String)"
},
"keyword": "When "
},
{
"result": {
"status": "undefined"
},
"line": 48,
"name": "the request should be approved",
"match": {},
"keyword": "Then "
},
{
"result": {
"status": "undefined"
},
"line": 49,
"name": "the punch for SHIFT_START from montreal store at 12:00 is created",
"match": {},
"keyword": "And "
}
],
"tags": [
{
"name": "@REQ_TR-4768"
},
{
"name": "@TEST_TR-5104"
},
{
"name": "@TESTSET_TR-5106"
},
{
"name": "@RestReady"
},
{
"name": "@TeamPunch"
},
{
"name": "@TimeCards"
}
]
}
],
"name": "Employee timecard edits (create / update) requests are auto-approved",
"description": "",
"id": "employee-timecard-edits-(create-/-update)-requests-are-auto-approved",
"keyword": "Feature",
"uri": "file:src/test/java/com/company/feature/timeCards/1_TR-4768.feature",
"tags": [
{
"name": "@REQ_TR-4768",
"type": "Tag",
"location": {
"line": 1,
"column": 1
}
}
]
}
]