Skip to content

Commit

Permalink
Standardize values and type of outcome
Browse files Browse the repository at this point in the history
Signed-off-by: Brett Smith <[email protected]>
  • Loading branch information
xbcsmith committed Jul 9, 2024
1 parent 865a8be commit da08d70
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion conformance/testcaserun_finished.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"source": "/event/source/123",
"type": "testCaseRun",
"content": {
"outcome": "pass",
"outcome": "success",
"environment": {
"id": "dev",
"source": "testkube-dev-123"
Expand Down
2 changes: 1 addition & 1 deletion conformance/testsuiterun_finished.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"source": "/event/source/123",
"type": "testSuiteRun",
"content": {
"outcome": "fail",
"outcome": "failure",
"severity": "critical",
"reason": "Host 123.34.23.32 not found",
"environment": {
Expand Down
7 changes: 6 additions & 1 deletion schemas/pipelinerunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@
"type": "string"
},
"outcome": {
"type": "string"
"type": "string",
"enum": [
"success",
"failure",
"error"
]
},
"errors": {
"type": "string"
Expand Down
5 changes: 2 additions & 3 deletions schemas/testcaserunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@
"outcome": {
"type": "string",
"enum": [
"pass",
"fail",
"cancel",
"success",
"failure",
"error"
]
},
Expand Down
5 changes: 2 additions & 3 deletions schemas/testsuiterunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@
"outcome": {
"type": "string",
"enum": [
"pass",
"fail",
"cancel",
"success",
"failure",
"error"
]
},
Expand Down
4 changes: 2 additions & 2 deletions testing-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ This event represents a finished testCase execution. The event will contain the
| environment | `Object` [`environment`](continuous-deployment.md/#environment) | The environment in which this testCaseRun was running | `{"id": "1234"}`, `{"id": "dev", "source": "testkube-dev-123"}` ||
| testCase | `Object` [`testCase`](#testcase) | Definition of the testCase being executed | `{"id": "92834723894", "name": "Login Test", "type": "integration"}` | |
| testSuiteRun | `Object` [`testSuiteRun`](#testsuiterun) | A testSuiteRun to associate this testCaseRun with a containing testSuiteRun | `{"id":"Auth-TestSuite-execution-12334", "source": "staging/testkube"}` | |
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `pass`, `fail`, `cancel`, `error` | `pass` ||
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `success`, `error` or `failure` | `success` ||
| severity | `String (enum)` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical` |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Failed assertion`, `Timed out` | |

Expand Down Expand Up @@ -188,7 +188,7 @@ This event represents a finished testSuite execution. The event will contain the
| id | `String` | Uniquely identifies the subject within the source. | `unit`, `e2e`, `security` ||
| source | `URI-Reference` | [source](spec.md#source--context-) from the context | | |
| environment | `Object` [`environment`](continuous-deployment.md/#environment) | The environment in which this testSuiteRun was running | `{"id": "1234"}`, `{"id": "dev", "source": "testkube-dev-123"}` ||
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `pass`, `fail`, `cancel`, `error` | `fail` ||
| outcome | `String (enum)` | The outcome of the testSuite execution, one of `success`, `error` or `failure` | `failure` ||
| severity | `String (enum)` | Severity if the test failed, one of `low`, `medium`, `high`, `critical` | `critical`, `low`, `medium`, `high` |
| reason | `String` | A reason related to the outcome of the execution | `Canceled by user`, `Failed testCase` | |
| testSuite | `Object` [`testSuite`](#testsuite) | Definition of the testSuite being executed | `{"id": "92834723894", "name": "Auth TestSuite"}` | |
Expand Down

0 comments on commit da08d70

Please sign in to comment.