Page History
...
| Code Block | ||
|---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?>
<testsuite tests="1" failures="0" name="ut.com.xpandit.raven.service.impl.IssueDataSetTest" time="0.114" errors="0" skipped="0">
<properties>
...
</properties>
<testcase classname="ut.com.xpandit.raven.service.impl.IssueDataSetTest" name="testApplyOptions_withValidIssueAndValidLimitOverflowOption_returnsExpectedSubset" time="0.114"/>
</testsuite> |
Xray-JUnit XML extension format
Users are also able to import JUnit results using the Xray extended format.
This format adds the following property elements:
- testrun_comment
- requirements
- test_key
- test_id
- test_description
- test_summary
- tags
- testrun_customfields
- testrun_evidence
For more detailed information, visit the Xray App GitHub repository: https://github.com/Xray-App/xray-junit-extensions.
NUnit v3.0 XML output format
...
| Info | ||
|---|---|---|
| ||
| This format supports importing execution evidence (attachments) embedded in the JSON file encoded in Base 64. |
...
| testKey | The test issue key |
| testInfo | The testInfo element (link) |
| start | The start date for the test run |
| finish | The finish date for the test run |
| comment | The comment for the test run |
| executedBy | The user id who executed the test run |
| assignee | The user id for the assignee of the test run |
| status | The test run status (PASSEDPASS, FAILEDFAIL, EXECUTING, TODO, custom statuses ...) |
| steps | The step results (link) |
| examples | The example results for BDD tests (link) |
| iterations | The iteration containing data-driven test results (link) |
| defects | An array of defect issue keys to associate with the test run |
| evidence | An array of evidence items of the test run (link) |
| customFields | An array of custom fields for the test run (link) |
...
| name | The iteration name |
| parameters | An array of parameters along with their values (link) |
| status | The status for the iteration (PASSEDPASS, FAILEDFAIL, EXECUTING, TODO, custom statuses ...) |
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
{
"$id": "XraySchema",
"type": "object",
"properties": {
"testExecutionKey": {
"type": "string"
},
"info": {
"type": "object",
"properties": {
"project": {
"type": "string"
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"revision": {
"type": "string"
},
"user": {
"type": "string"
},
"startDate": {
"type": "string",
"format": "date-time"
},
"finishDate": {
"type": "string",
"format": "date-time"
},
"testPlanKey": {
"type": "string"
},
"testEnvironments": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/Test"
},
"minItems": 1,
}
},
"additionalProperties": false,
"definitions": {
"Test": {
"type": "object",
"properties": {
"testKey": {
"type": "string"
},
"testInfo": {
"$ref": "#/definitions/TestInfo"
},
"start": {
"type": "string",
"format": "date-time"
},
"finish": {
"type": "string",
"format": "date-time"
},
"comment": {
"type": "string"
},
"executedBy": {
"type": "string"
},
"assignee": {
"type": "string"
},
"status": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"$ref": "#/definitions/ManualTestStepResult"
}
},
"examples": {
"type": "array",
"items": {
"type": "string",
"enum": ["TODO", "FAILED", "PASSED", "EXECUTING"]
}
},
"resultsiterations": { // DEPRECATED
"type": "array",
"items": {
"$ref": "#/definitions/IterationResult"
}
},
"iterationsdefects": {
"type": "array",
"items": {
"$reftype": "#/definitions/IterationResult"
}
},
"defects": {
"type": "array",
"items": {
"type": "string"string"
}
},
"evidence": {
"type": "array",
"items": {
"$ref": "#/definitions/EvidenceItem"
}
},
"evidences": { // DEPRECATED
"type": "array",
"items": {
"$ref": "#/definitions/EvidenceItem"
}
},
"customFields": {
"$ref": "#/definitions/CustomField"
}
},
"required": ["status"],
"dependencies": {
"evidence": {
"not": { "required": ["evidences"] }
},
"evidences": {
"not": { "required": ["evidence"] }
},
"steps": {
"allOf": [
{
"not": { "required": ["examples"] }
},
{
"not": { "required": ["resultsiterations"] }
},
]
{
},
"notexamples": { "required": ["iterations"] }
"allOf": [
}
]{
},
"not": { "examplesrequired": { ["steps"] }
"allOf": [ },
{
"not": { "required": ["stepsiterations"] }
},
]
{
},
"notiterations": { "required": ["results"] }
},"allOf": [
{
"not": { "required": ["iterationssteps"] }
},
] {
},
"not": { "resultsrequired": {
["examples"] }
"allOf": [}
]
{
}
"not": { "required": ["steps"] }
},
{
"not": { "required": ["examples"] }
},
{
"not": { "required": ["iterations"] }
}
]
},
"iterations": {
"allOf": [
{
"not": { "required": ["steps"] }
},
{
"not": { "required": ["examples"] }
},
{
"not": { "required": ["results"] }
}
]
}
},
},
"additionalProperties": false
},
"IterationResult": {
"type": "object",
"properties": {
"name": {
"type": "stringobject",
},"properties": {
"parameters": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": ["name"],
"additionalProperties": false
}
},
"log": {
"type": "string"
},
"duration": {false
"type": "string"}
},
"status": {
"type": "string"
},
"steps": {
"type": "array",
"items": {
"$ref": "#/definitions/ManualTestStepResult"
}
}
},
"required": ["status"],
"additionalProperties": false
},
"ManualTestStepResult": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"comment": {
"type": "string"
},
"evidenceevidences": {
"type": "array",
"items": {
"$ref": "#/definitions/EvidenceItem"
}
},
"defects": {
"type": "array",
"items": {
"type": "string"
}
},
"actualResult": {
"type": "string"
}
},
"required": ["status"],
"additionalProperties": false
},
"TestInfo": {
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"projectKey": {
"type": "string"
},
"requirementKeys": {
"type": "array",
"items": {
"type": "string"
}
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"typetestType": {
"type": "string"
},
steps: {
type: "array",
items: {
type: "object",
properties: {
action: {
type: "string"
},
data: {
type: "string"
},
result: {
type: "string"
}
},
// custom fields
patternProperties: {required: ["action"],
".+": {}
},additionalProperties: false
required: ["action"],
}
},
additionalProperties "scenario": false{
}"type": "string"
},
"scenarioscenarioType": {
"type": "string"
},
"definition": {
"type": "string"
}
},
"dependencies": {
"steps": {
"allOf": [
{
"not": { "required": ["scenario"] }
},
{
"not": { "required": ["definition"] }
}
]
},
"scenario": {
"allOf": [
{
"not": { "required": ["steps"] }
},
{
"not": { "required": ["definition"] }
}
]
},
"definition": {
"allOf": [
{
"not": { "required": ["steps"] }
},
{
"not": { "required": ["scenario"] }
}
]
}
},
"required": ["summary", "projectKey", "typetestType"],
"additionalProperties": false
},
"EvidenceItem": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"filename": {
"type": "string"
},
"contentType": {
"type": "string"
}
},
"required": ["data", "filename"],
"additionalProperties": false
},
"CustomField": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {}
},
"required": ["id", "value"],
"additionalProperties": false
}
}
}
} |
...
| Code Block | ||
|---|---|---|
| ||
{
"testExecutionKey" : "DEMO-1206",
"tests" : [
{
"testKey" : "DEMO-7",
"start" : "2013-05-03T11:47:35+01:00",
"finish" : "2013-05-03T11:50:56+01:00",
"comment" : "Test was OK but the performance is very poor",
"status" : "PASS"
},
{
"testKey" : "DEMO-8",
"start" : "2013-05-03T12:14:12+01:00",
"finish" : "2013-05-03T12:15:23+01:00",
"comment" : "Performance was better this time, in the context of test set DEMO-10.",
"status" : "PASS"
},
{
"testKey" : "DEMO-9",
"start" : "2013-05-03T12:19:23+01:00",
"finish" : "2013-05-03T12:20:01+01:00",
"comment" : "Error decreasing space shuttle speed.",
"status" : "FAIL",
"examples" : [
"PASS",
"PASS",
"PASS",
"PASS",
"PASS",
"FAIL"
]
}
]
} |
...
| Code Block | ||
|---|---|---|
| ||
{
"testExecutionKey" : "DEMO-1206",
"tests" : [
{
"testKey" : "ABC-129",
"start" : "2014-08-30T11:47:35+01:00",
"finish" : "2014-08-30T11:50:56+01:00",
"comment" : "Successful execution",
"status" : "PASS"
}
]
} |
...
| Code Block | ||
|---|---|---|
| ||
{
"testExecutionKey" : "DEMO-1206",
"tests" : [
{
"testKey" : "DEMO-57",
"start" : "2014-08-30T12:19:23+01:00",
"finish" : "2014-08-30T12:20:01+01:00",
"comment" : "Error executing step 2!",
"status" : "FAILEDFAIL",
"steps": [
{
"status": "PASSEDPASS",
"actualResult": "Step 1: OK"
},
{
"status": "FAILEDFAIL",
"actualResult": "Step 2 *Failed* with an unexpected error message",
"evidences" : [
{
"data": "(... base 64 encoded ...)",
"filename": "screenshot1.jpg",
"contentType": "image/jpeg"
}
]
}
]
}
]
} |
...
| Code Block | ||
|---|---|---|
| ||
{
"testExecutionKey" : "DEMO-1206",
"tests": [
{
"start" : "2021-08-30T11:47:35+01:00",
"finish" : "2021-08-30T11:50:56+01:00",
"comment" : "Successful execution",
"status" : "PASSEDPASS",
"evidence" : [
{
"data": "iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)",
"filename": "image21.jpg",
"contentType": "image/jpeg"
}
],
"testInfo": {
"summary": "Strong password validation",
"typetestType": "Manual",
"projectKey": "STORE",
"steps": [
{
"action": "Open the Change Password screen by selecting option \"My Profile > Password\"",
"data": "",
"result": ""
},
{
"action": "Fill the password fields with data",
"data": "Current Password: ${Password}\nNew Password: ${Password}\nConfirm New Password: ${Password}",
"result": "The new password is: ${Valid}\nError:\n${Message}"
}
]
},
"iterations": [
{
"parameters": [
{
"name": "Password",
"value": "2635ftvu23v7t!09"
},
{
"name": "Valid",
"value": "Valid"
},
{
"name": "Message",
"value": ""
}
],
"status": "PASSEDPASS",
"steps": [
{
"actualResult": "",
"status": "PASSEDPASS"
},
{
"actualResult": "Password changed successfully",
"status": "PASSEDPASS"
}
]
},
{
"parameters": [
{
"name": "Password",
"value": "123123"
},
{
"name": "Valid",
"value": "Not Valid"
},
{
"name": "Message",
"value": "Password is too simple."
}
],
"status": "FAILEDFAIL",
"steps": [
{
"actualResult": "",
"status": "PASSEDPASS"
},
{
"actualResult": "Password too simple!",
"status": "FAILEDFAIL"
}
]
}
]
}
]
} |
Importing Multiple Execution results
...
| Tip |
|---|
When importing execution results using the Cucumber JSON output formatter, multiple executions for the same scenario/Test issue will be merged into a single Test Run. When importing execution results using the Xray JSON format, the results JSON element must contain all execution results for the same Test Run. |
...