Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlePOST /rest/raven/1.0/import/execution/cucumber
Panel
borderColor#ccc
borderStylesolid

Import the execution results created with the Cucumber JSON output formatter. For more information please check the Cucumber reports documentation (example here).

Request

Example
Code Block
titleExample Input
[
  {
    "keyword": "Feature",
    "name": "Arithmetic Operations",
    "line": 3,
    "description": "",
    "tags": [
      {
        "name": "@DEMO-48",
        "line": 1
      },
      {
        "name": "@REQ_DEMO-45",
        "line": 2
      }
    ],
    "id": "arithmetic-operations",
    "uri": "features/1_DEMO-45.feature",
    "elements": [
      {
        "comments": [
          {
            "value": "#In order to avoid silly mistakes",
            "line": 4
          },
          {
            "value": "#As a math idiot ",
            "line": 5
          },
          {
            "value": "#I want to be told the result of basic arithmetic operations between two numbers",
            "line": 6
          }
        ],
        "keyword": "Scenario Outline",
        "name": "Add two Numbers",
        "line": 18,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-47",
            "line": 9
          }
        ],
        "id": "arithmetic-operations;add-two-numbers;;2",
        "type": "scenario",
        "steps": [
          {
			"embeddings": [
              {
				  "mime_type": "text/plain",
				  "data": "{data base64}"
              },{
				  "mime_type": "text/plain",
				  "data": "{data base64}"
              }
            "keyword": "Given ",
            "name": "I have entered 20 into the calculator",
            "line": 11,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "20"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 487000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 30 into the calculator",
            "line": 12,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "30"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 340000
            }
          },
          {
            "keyword": "When ",
            "name": "I press add",
            "line": 13,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "add"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 327000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 50 on the screen",
            "line": 14,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "50"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 11723000
            }
          }
        ]
      },
      {
        "comments": [
          {
            "value": "#In order to avoid silly mistakes",
            "line": 4
          },
          {
            "value": "#As a math idiot ",
            "line": 5
          },
          {
            "value": "#I want to be told the result of basic arithmetic operations between two numbers",
            "line": 6
          }
        ],
        "keyword": "Scenario Outline",
        "name": "Add two Numbers",
        "line": 19,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-47",
            "line": 9
          }
        ],
        "id": "arithmetic-operations;add-two-numbers;;3",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 2 into the calculator",
            "line": 11,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "2"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 992000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 5 into the calculator",
            "line": 12,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "5"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 775000
            }
          },
          {
            "keyword": "When ",
            "name": "I press add",
            "line": 13,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "add"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 322000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 7 on the screen",
            "line": 14,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "7"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 423000
            }
          }
        ]
      },
      {
        "comments": [
          {
            "value": "#In order to avoid silly mistakes",
            "line": 4
          },
          {
            "value": "#As a math idiot ",
            "line": 5
          },
          {
            "value": "#I want to be told the result of basic arithmetic operations between two numbers",
            "line": 6
          }
        ],
        "keyword": "Scenario Outline",
        "name": "Add two Numbers",
        "line": 20,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-47",
            "line": 9
          }
        ],
        "id": "arithmetic-operations;add-two-numbers;;4",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 0 into the calculator",
            "line": 11,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "0"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 384000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 40 into the calculator",
            "line": 12,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "40"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 313000
            }
          },
          {
            "keyword": "When ",
            "name": "I press add",
            "line": 13,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "add"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 280000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 40 on the screen",
            "line": 14,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "40"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 350000
            }
          }
        ]
      },
      {
        "keyword": "Scenario Outline",
        "name": "Divide Two Numbers",
        "line": 32,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-46",
            "line": 23
          }
        ],
        "id": "arithmetic-operations;divide-two-numbers;;2",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 8 into the calculator",
            "line": 25,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "8"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 344000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 4 into the calculator",
            "line": 26,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "4"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 292000
            }
          },
          {
            "keyword": "When ",
            "name": "I press divide",
            "line": 27,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "divide"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 291000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 2 on the screen",
            "line": 28,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "2"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 320000
            }
          }
        ]
      },
      {
        "keyword": "Scenario Outline",
        "name": "Divide Two Numbers",
        "line": 33,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-46",
            "line": 23
          }
        ],
        "id": "arithmetic-operations;divide-two-numbers;;3",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 12 into the calculator",
            "line": 25,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "12"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 1102000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 3 into the calculator",
            "line": 26,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "3"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 891000
            }
          },
          {
            "keyword": "When ",
            "name": "I press divide",
            "line": 27,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "divide"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 291000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 4 on the screen",
            "line": 28,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "4"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 339000
            }
          }
        ]
      },
      {
        "keyword": "Scenario Outline",
        "name": "Divide Two Numbers",
        "line": 34,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-46",
            "line": 23
          }
        ],
        "id": "arithmetic-operations;divide-two-numbers;;4",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 3 into the calculator",
            "line": 25,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "3"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 304000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 1 into the calculator",
            "line": 26,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "1"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 309000
            }
          },
          {
            "keyword": "When ",
            "name": "I press divide",
            "line": 27,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "divide"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 257000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 5 on the screen",
            "line": 28,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "5"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 840000
            }
          }
        ]
      }
    ]
  }
]
Tip
titleExample Request
curl -H "Content-Type: application/json" -X POST -u admin:admin --data @cucumber_output.json http://yourserver/rest/raven/1.0/import/execution/cucumber

Responses

200 OK : application/json : Successful. The results where successfully imported to Jira.

Code Block
titleExample Output
{
    "testExecIssue": {
           "id": "10000",
           "key": "DEMO-123",
           "self": "http://www.example.com/jira/rest/api/2/issue/10000"
     }
}


400 BAD_REQUEST : application/json : No execution results where provided.

401 UNAUTHORIZED : application/json : The Xray license is not valid.

500  INTERNAL SERVER ERROR : application/json : An internal error occurred when importing execution results.

...

Expand
titlePOST /rest/raven/1.0/import/execution/cucumber/multipart
Panel
borderColor#ccc
borderStylesolid

Import the execution results created with the Cucumber JSON output formatter. For more information, please check the Cucumber reports documentation (example here).

Note: Currently, if you specify the Test Plan custom field, the Tests of the Test Execution will not be added automatically to the Test Plan.

Request

Example
Code Block
titleResult Json
[
  {
    "keyword": "Feature",
    "name": "Arithmetic Operations",
    "line": 3,
    "description": "",
    "tags": [
      {
        "name": "@DEMO-48",
        "line": 1
      },
      {
        "name": "@REQ_DEMO-45",
        "line": 2
      }
    ],
    "id": "arithmetic-operations",
    "uri": "features/1_DEMO-45.feature",
    "elements": [
      {
        "comments": [
          {
            "value": "#In order to avoid silly mistakes",
            "line": 4
          },
          {
            "value": "#As a math idiot ",
            "line": 5
          },
          {
            "value": "#I want to be told the result of basic arithmetic operations between two numbers",
            "line": 6
          }
        ],
        "keyword": "Scenario Outline",
        "name": "Add two Numbers",
        "line": 18,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-47",
            "line": 9
          }
        ],
        "id": "arithmetic-operations;add-two-numbers;;2",
        "type": "scenario",
        "steps": [
          {
			"embeddings": [
              {
				  "mime_type": "text/plain",
				  "data": "{data base64}"
              },{
				  "mime_type": "text/plain",
				  "data": "{data base64}"
              }
            "keyword": "Given ",
            "name": "I have entered 20 into the calculator",
            "line": 11,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "20"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 487000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 30 into the calculator",
            "line": 12,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "30"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 340000
            }
          },
          {
            "keyword": "When ",
            "name": "I press add",
            "line": 13,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "add"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 327000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 50 on the screen",
            "line": 14,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "50"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 11723000
            }
          }
        ]
      },
      {
        "comments": [
          {
            "value": "#In order to avoid silly mistakes",
            "line": 4
          },
          {
            "value": "#As a math idiot ",
            "line": 5
          },
          {
            "value": "#I want to be told the result of basic arithmetic operations between two numbers",
            "line": 6
          }
        ],
        "keyword": "Scenario Outline",
        "name": "Add two Numbers",
        "line": 19,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-47",
            "line": 9
          }
        ],
        "id": "arithmetic-operations;add-two-numbers;;3",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 2 into the calculator",
            "line": 11,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "2"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 992000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 5 into the calculator",
            "line": 12,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "5"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 775000
            }
          },
          {
            "keyword": "When ",
            "name": "I press add",
            "line": 13,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "add"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 322000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 7 on the screen",
            "line": 14,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "7"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 423000
            }
          }
        ]
      },
      {
        "comments": [
          {
            "value": "#In order to avoid silly mistakes",
            "line": 4
          },
          {
            "value": "#As a math idiot ",
            "line": 5
          },
          {
            "value": "#I want to be told the result of basic arithmetic operations between two numbers",
            "line": 6
          }
        ],
        "keyword": "Scenario Outline",
        "name": "Add two Numbers",
        "line": 20,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-47",
            "line": 9
          }
        ],
        "id": "arithmetic-operations;add-two-numbers;;4",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 0 into the calculator",
            "line": 11,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "0"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 384000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 40 into the calculator",
            "line": 12,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "40"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 313000
            }
          },
          {
            "keyword": "When ",
            "name": "I press add",
            "line": 13,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "add"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 280000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 40 on the screen",
            "line": 14,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "40"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 350000
            }
          }
        ]
      },
      {
        "keyword": "Scenario Outline",
        "name": "Divide Two Numbers",
        "line": 32,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-46",
            "line": 23
          }
        ],
        "id": "arithmetic-operations;divide-two-numbers;;2",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 8 into the calculator",
            "line": 25,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "8"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 344000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 4 into the calculator",
            "line": 26,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "4"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 292000
            }
          },
          {
            "keyword": "When ",
            "name": "I press divide",
            "line": 27,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "divide"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 291000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 2 on the screen",
            "line": 28,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "2"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 320000
            }
          }
        ]
      },
      {
        "keyword": "Scenario Outline",
        "name": "Divide Two Numbers",
        "line": 33,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-46",
            "line": 23
          }
        ],
        "id": "arithmetic-operations;divide-two-numbers;;3",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 12 into the calculator",
            "line": 25,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "12"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 1102000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 3 into the calculator",
            "line": 26,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "3"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 891000
            }
          },
          {
            "keyword": "When ",
            "name": "I press divide",
            "line": 27,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "divide"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 291000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 4 on the screen",
            "line": 28,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "4"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 339000
            }
          }
        ]
      },
      {
        "keyword": "Scenario Outline",
        "name": "Divide Two Numbers",
        "line": 34,
        "description": "",
        "tags": [
          {
            "name": "@TEST_DEMO-46",
            "line": 23
          }
        ],
        "id": "arithmetic-operations;divide-two-numbers;;4",
        "type": "scenario",
        "steps": [
          {
            "keyword": "Given ",
            "name": "I have entered 3 into the calculator",
            "line": 25,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "3"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 304000
            }
          },
          {
            "keyword": "And ",
            "name": "I have entered 1 into the calculator",
            "line": 26,
            "match": {
              "arguments": [
                {
                  "offset": 15,
                  "val": "1"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:14"
            },
            "result": {
              "status": "passed",
              "duration": 309000
            }
          },
          {
            "keyword": "When ",
            "name": "I press divide",
            "line": 27,
            "match": {
              "arguments": [
                {
                  "offset": 8,
                  "val": "divide"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:18"
            },
            "result": {
              "status": "passed",
              "duration": 257000
            }
          },
          {
            "keyword": "Then ",
            "name": "the result should be 5 on the screen",
            "line": 28,
            "match": {
              "arguments": [
                {
                  "offset": 21,
                  "val": "5"
                }
              ],
              "location": "features/step_definitions/calculator_steps.rb:22"
            },
            "result": {
              "status": "passed",
              "duration": 840000
            }
          }
        ]
      }
    ]
  }
]
Code Block
titleInfo JSON (Test Execution)
{
	"fields": {
		"project": {
			"id": "10402"
		},
		"summary": "Test Execution for cucumber Execution",
		"issuetype": {
			"id": "10007"
		},
		"components" : [
			{
			"name":"Interface"
			},
			{
			"name":"Core"
			}
		],
		"customfield_10032" : [
			"TES-38"
		]
	}
}
Tip
titleExample Request

curl -u admin:admin -F info=@createTestExec.json -F result=@results.json httpjson http://yourserver/rest/raven/1.0/import/execution/cucumber/multipart

Tip
titleAssigning Test Environment(s) to Test Execution

It's possible to assign Test Environment(s) to the newly-created Test Execution. For that, you need to pass the ID of the custom field corresponding to the "Test Environments" custom field. In the JSON example below, it is 10030 for the info object.

Note: Currently, if you specify the Test Plan custom field, the Tests of the Test Execution will not be added automatically to the Test Plan.

Code Block
languagejs
{
    "fields": {
        "project": {
            "key": "XRAY"
        },
        "summary": "Test Execution for cucumber Execution",
        "issuetype": {
            "id": "10009"
        },
        "customfield_10030" : [
            "iOS", "Android"
        ]
    }
}

Responses

200 OK : application/json : Successful. The results where successfully imported to Jira.

Code Block
titleExample Output
{
    "testExecIssue": {
           "id": "10000",
           "key": "DEMO-123",
           "self": "http://www.example.com/jira/rest/api/2/issue/10000"
     }
}


400 BAD_REQUEST : application/json : No execution results where provided.

401 UNAUTHORIZED : application/json : The Xray license is not valid.

500  INTERNAL SERVER ERROR : application/json : An internal error occurred when importing execution results.

...

Expand
titlePOST /rest/raven/1.0/import/execution/robot/multipart
Panel
borderColor#ccc
borderStylesolid

Imports the execution results from Robot Framework XML output format. For more information please check the documentation about

Note: Currently, if you specify the Test Plan custom field, the Tests of the Test Execution will not be added automatically to the Test Plan.

Request

Example

Code Block
titleRobot Report XML
<?xml version="1.0" encoding="UTF-8"?>
<robot generated="20170220 14:18:54.562" generator="Robot 3.0.2 (Python 2.7.13 on win32)">
  <suite source="C:\Users\lmfv\Documents\Saco de Features\xray-1238\robot-example\robotframework-webdemo\login_tests" id="s1" name="Login Tests">
    <suite source="C:\Users\lmfv\Documents\Saco de Features\xray-1238\robot-example\robotframework-webdemo\login_tests\gherkin_login.robot" id="s1-s1" name="Gherkin Login">
      <test id="s1-s1-t1" name="Gherkin Valid Login">
        <kw name="Given browser is opened to login page">
          <kw name="Login Page Should Be Open" library="resource">
            <kw name="Title Should Be" library="Selenium2Library">
              <doc>Verifies that current page title equals `title`.</doc>
              <arguments>
                <arg>Log in - Your Company JIRA</arg>
              </arguments>
              <msg timestamp="20170220 14:19:07.693" level="INFO">Page title is 'Log in - Your Company JIRA'.</msg>
              <status status="PASS" endtime="20170220 14:19:07.693" starttime="20170220 14:19:07.158">
              </status>
            </kw>
            <status status="PASS" endtime="20170220 14:19:07.693" starttime="20170220 14:19:07.158">
            </status>
          </kw>
          <status status="PASS" endtime="20170220 14:19:07.693" starttime="20170220 14:18:55.937">
          </status>
        </kw>
        <kw name="When user &quot;admin&quot; logs in with password &quot;password123&quot;">
          <kw name="Input Username" library="resource">
            <arguments>
              <arg>${username}</arg>
            </arguments>
            <kw name="Input Text" library="Selenium2Library">
              <doc>Types the given `text` into text field identified by `locator`.</doc>
              <arguments>
                <arg>login-form-username</arg>
                <arg>${username}</arg>
              </arguments>
              <msg timestamp="20170220 14:19:07.696" level="INFO">Typing text 'admin' into text field 'login-form-username'</msg>
              <status status="PASS" endtime="20170220 14:19:09.314" starttime="20170220 14:19:07.696">
              </status>
            </kw>
            <status status="PASS" endtime="20170220 14:19:09.314" starttime="20170220 14:19:07.695">
            </status>
          </kw>
          <kw name="Input Password" library="resource">
            <arguments>
              <arg>${password}</arg>
            </arguments>
            <kw name="Input Text" library="Selenium2Library">
              <doc>Types the given `text` into text field identified by `locator`.</doc>
              <arguments>
                <arg>login-form-password</arg>
                <arg>${password}</arg>
              </arguments>
              <msg timestamp="20170220 14:19:09.316" level="INFO">Typing text 'password123' into text field 'login-form-password'</msg>
              <status status="PASS" endtime="20170220 14:19:10.956" starttime="20170220 14:19:09.316">
              </status>
            </kw>
            <status status="PASS" endtime="20170220 14:19:10.956" starttime="20170220 14:19:09.315">
            </status>
          </kw>
          <kw name="Submit Credentials" library="resource">
            <kw name="Click Button" library="Selenium2Library">
              <doc>Clicks a button identified by `locator`.</doc>
              <arguments>
                <arg>login-form-submit</arg>
              </arguments>
              <msg timestamp="20170220 14:19:10.958" level="INFO">Clicking button 'login-form-submit'.</msg>
              <status status="PASS" endtime="20170220 14:19:17.476" starttime="20170220 14:19:10.958">
              </status>
            </kw>
            <status status="PASS" endtime="20170220 14:19:17.477" starttime="20170220 14:19:10.957">
            </status>
          </kw>
          <status status="PASS" endtime="20170220 14:19:17.478" starttime="20170220 14:19:07.695">
          </status>
        </kw>
        <kw name="Then welcome page should be open" library="resource">
          <kw name="Location Should Be" library="Selenium2Library">
            <doc>Verifies that current URL is exactly `url`.</doc>
            <arguments>
              <arg>${WELCOME URL}</arg>
            </arguments>
            <kw name="Capture Page Screenshot" library="Selenium2Library">
              <doc>Takes a screenshot of the current page and embeds it into the log.</doc>
              <msg timestamp="20170220 14:19:18.702" html="yes" level="INFO">&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan="3"&gt;&lt;a href="selenium-screenshot-1.png"&gt;&lt;img src="selenium-screenshot-1.png" width="800px"&gt;&lt;/a&gt;</msg>
              <status status="PASS" endtime="20170220 14:19:18.702" starttime="20170220 14:19:18.004">
              </status>
            </kw>
            <msg timestamp="20170220 14:19:18.705" level="FAIL">Location should have been 'http://localhost:8080/secure/Dashboard.jspa' but was 'http://localhost:8080/login.jsp'</msg>
            <status status="FAIL" endtime="20170220 14:19:18.705" starttime="20170220 14:19:17.483">
            </status>
          </kw>
          <status status="FAIL" endtime="20170220 14:19:18.706" starttime="20170220 14:19:17.481">
          </status>
        </kw>
        <kw type="teardown" name="Close Browser" library="Selenium2Library">
          <doc>Closes the current browser.</doc>
          <status status="PASS" endtime="20170220 14:19:22.382" starttime="20170220 14:19:18.707">
          </status>
        </kw>
        <tags>
          <tag>WEB-1</tag>
          <tag>WEB-3</tag>
        </tags>
        <status status="FAIL" endtime="20170220 14:19:22.383" critical="yes" starttime="20170220 14:18:55.936">Location should have been 'http://localhost:8080/secure/Dashboard.jspa' but was 'http://localhost:8080/login.jsp'</status>
      </test>
      <doc>A test suite with a single Gherkin style test.This test is functionally identical to the example invalid_login.robot file.</doc>
      <status status="FAIL" endtime="20170220 14:19:22.397" starttime="20170220 14:18:54.670">
      </status>
    </suite>
    <status status="FAIL" endtime="20170220 14:22:12.549" starttime="20170220 14:18:54.567">
    </status>
  </suite>
</robot>


Code Block
titleInfo JSON
{
	"fields": {
		"project": {
			"id": "10402"
		},
		"summary": "Test Execution for robot Execution",
		"issuetype": {
			"id": "10007"
		},
		"components" : [
			{
			"name":"Interface"
			},
			{
			"name":"Core"
			}
		]
	}
}


Tip
titleExample Request

curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@output.xml" -F "info="@testExec.json" http://yourserver/rest/raven/1.0/import/execution/robot/multipart

Responses

200 OK : application/json : Successful. The results where successfully imported to Jira.

Code Block
titleExample Output
{
  "testExecIssue": {
    "id": "10200",
    "key": "XNP-24",
    "self": "http://www.example.com/jira/rest/api/2/issue/10200"
  }
}

400 BAD_REQUEST : application/json : Returns the error.

401 UNAUTHORIZED : application/json : The Xray license is not valid.

500  INTERNAL SERVER ERROR : application/json : An internal error occurred when importing execution results.

...

Expand
titlePOST /rest/raven/1.0/import/execution/bundle
Panel
borderColor#ccc
borderStylesolid

Import the execution results created with the Cucumber JSON output formatter. For more information, please check the Cucumber reports documentation.

Request

multipart/form-data:

"filePart" : a MultipartFormParam containing a compressed zip file to import or a JSON file to import.

Tip
titleExample Request
curl -H "Content-Type: multipart/form-data" -u admin:admin -F "file=@cucumber_results.zip" http://yourserver/rest/raven/1.0/import/execution/bundle

Responses

200 OK : application/json : Successful. The results where successfully imported to Jira.

Code Block
titleExample Output
{
    "testExecIssue": {
           "id": "10000",
           "key": "DEMO-123",
           "self": "http://www.example.com/jira/rest/api/2/issue/10000"
     }
}

400 BAD_REQUEST : application/json : No execution results where provided.

401 UNAUTHORIZED : application/json : The Xray license is not valid.

500  INTERNAL SERVER ERROR : application/json : An internal error occurred when importing execution results.

...