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,465,243
Community Members
 
Community Events
176
Community Groups

Xray API using Postman

Edited

Hello,

I'm familiarizing myself with the Xray APIs to import automation test results using Postman first and then would like to move it to our framework. I'm currently running into the error below.

{
    "info": "Invalid Parameters - /import/execution/cucumber",
    "errors": [
        "body[]: Invalid value"
    ]
}
I'm providing the below in postman for the URI and body. I can use this very same data in the cucumber report json file and successfully import results manually to an existing Test Execution but have had no luck via API. Do you see anything wrong with the below request? Any help is greatly appreciated.
[
{
"name": "API Test - Create an mFleet policy for states via API using data table",
"description": "",
"id": "api-test---create-an-mfleet-policy-for-states-via-api-using-data-table",
"keyword": "Feature",
"uri": "file:src/test/resources/guidewire/features/mFleet/inshare/GWPCv1/Generic/APITest.feature",
"tags": [],
"line": 4,
"elements": [
{
"line": 32,
"name": "Create an mFleet policy for FL state via API using data table Stepdefinition",
"description": "",
"id": "api-test---create-an-mfleet-policy-for-states-via-api-using-data-table;create-an-mfleet-policy-for-\u003cstate-code\u003e-state-via-api-using-data-table-stepdefinition;;2",
"type": "scenario",
"keyword": "Scenario Outline",
"steps": [
{
"result": {
"duration": 4879000,
"status": "passed"
},
"line": 8,
"name": "I set below Test Variables",
"match": {
"location": "ApiStepDefinitions.setTestVariables(DataTable)"
},
"rows": [
{
"cells": [
"TestVariableName",
"Value"
]
},
{
"cells": [
"product",
"mfleet"
]
},
{
"cells": [
"stateCode",
"FL"
]
},
{
"cells": [
"pcUserRole",
"producer"
]
}
],
"keyword": "Given "
},
{
"result": {
"error_message": "java.lang.AssertionError: {\"userMessage\":\"Entity validation errors block \u0027quote\u0027 action\",\"errorCode\":\"gw.api.rest.exceptions.BadInputException\",\"details\":[{\"message\":\"Uninsured Motorists Coverage: The coverage term \u0027Uninsured Motorists Coverage Type\u0027 is required. Enter a value.\",\"properties\":{\"severity\":\"error\",\"id\":\"CA7VehicleUninsuredMotoristPolicy\",\"type\":\"CA7JurisdictionCoverage\",\"url\":\"/job/v1/jobs/pc:144795/lines/CA7Line/jurisdictions/200539/coverages/CA7VehicleUninsuredMotoristPolicy\"}},{\"message\":\"Truck Liability: The coverage term \u0027Liability Limit\u0027 is required. Enter a value.\",\"properties\":{\"severity\":\"error\",\"id\":\"CA7VehicleLiabTTT\",\"type\":\"CA7TruckCoverage\",\"url\":\"/job/v1/jobs/pc:144795/lines/CA7Line/trucks/1160626/coverages/CA7VehicleLiabTTT\"}},{\"message\":\"Liability Limits cannot differ between Commercial Auto and Vehicle screens.\",\"properties\":{\"severity\":\"error\",\"type\":\"CA7Line\",\"url\":\"/job/v1/jobs/pc:144795/lines/CA7Line\"}}],\"status\":400}\r\n\tat com.mobilitas.automation.api.services.pc.PolicyCenterApi.checkErrorCode(PolicyCenterApi.java:212)\r\n\tat com.mobilitas.automation.api.services.pc.PolicyCenterApi.postJsonRequest(PolicyCenterApi.java:82)\r\n\tat com.mobilitas.automation.api.services.pc.PolicyCenterApi.postRequest(PolicyCenterApi.java:41)\r\n\tat com.mobilitas.automation.utils.ApiUtilMethods.processApiRequest(ApiUtilMethods.java:576)\r\n\tat com.mobilitas.automation.stepdefinitions.app.api.ApiStepDefinitions.createandProcessRequest(ApiStepDefinitions.java:318)\r\n\tat com.mobilitas.automation.stepdefinitions.app.api.ApiStepDefinitions.processStandaloneRequest(ApiStepDefinitions.java:214)\r\n\tat com.mobilitas.automation.stepdefinitions.app.api.ApiStepDefinitions.processStandaloneRequestWithData(ApiStepDefinitions.java:229)\r\n\tat com.mobilitas.automation.stepdefinitions.app.api.ApiStepDefinitions.processPayloadUsingApi(ApiStepDefinitions.java:88)\r\n\tat ✽.I process GW API requests in the below order(file:src/test/resources/guidewire/features/mFleet/inshare/GWPCv1/Generic/APITest.feature:15)\r\n",
"duration": 11288658400,
"status": "failed"
},
"line": 15,
"name": "I process GW API requests in the below order",
"match": {
"arguments": [
{
"val": "GW",
"offset": 10
}
],
"location": "ApiStepDefinitions.processPayloadUsingApi(String,DataTable)"
},
"rows": [
{
"cells": [
"Transaction",
"Data",
"ExpectedResponseStatus"
]
},
{
"cells": [
"CREATE_ACCOUNT",
"",
"valid"
]
},
{
"cells": [
"CREATE_SUBMISSION",
"POLICY_EFFECTIVE_LESS_01_01_2022",
"valid"
]
},
{
"cells": [
"CREATE_TRUCK",
"VEHICLE_INFO_OWNED_TRUCK",
"valid"
]
},
{
"cells": [
"CREATE_DRIVER",
"DRIVER_DETAILS_AZ",
"valid"
]
},
{
"cells": [
"CREATE_COVERED_SYMBOL_SCHEDULED_ITEM",
"",
"valid"
]
},
{
"cells": [
"SYNC_LINE_COVERAGES",
"",
"valid"
]
},
{
"cells": [
"QUOTE_SUBMISSION",
"",
"valid"
]
},
{
"cells": [
"APPROVE_UW_ISSUE",
"",
"valid"
]
},
{
"cells": [
"UPDATE_PAYMENT_PLAN",
"QUARTERLY",
"valid"
]
},
{
"cells": [
"BIND_AND_ISSUE",
"",
"valid"
]
}
],
"keyword": "Then "
}
],
"tags": [
{
"name": "@MfleetPolicyGWAPIDataTable"
},
{
"name": "@TEST_MOB-38822"
},
{
"name": "@MOB-38823"
}
]
}
]
}
]

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS

Atlassian Community Events