-
-
Notifications
You must be signed in to change notification settings - Fork 555
Replace optional key with scenarios #1677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5863bf9
872c404
937dc6f
c6d82a9
9f55ec0
cc73951
26c37e4
f91b714
d81b803
473b7c5
cab3383
929c3d1
f7af919
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
floating-point | ||
big-integer | ||
floating-point | ||
library-test | ||
unicode |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ | |
, "properties" : | ||
{ "uuid" : { "$ref": "#/definitions/uuid" } | ||
, "description": { "$ref": "#/definitions/description" } | ||
, "optional" : { "$ref": "#/definitions/optional" } | ||
, "scenarios" : { "$ref": "#/definitions/scenarios" } | ||
, "comments" : { "$ref": "#/definitions/comments" } | ||
, "property" : { "$ref": "#/definitions/property" } | ||
, "input" : { "$ref": "#/definitions/input" } | ||
|
@@ -95,7 +95,7 @@ | |
, "required" : ["description", "cases"] | ||
, "properties" : | ||
{ "description": { "$ref": "#/definitions/description" } | ||
, "optional" : { "$ref": "#/definitions/optional" } | ||
, "scenarios" : { "$ref": "#/definitions/scenarios" } | ||
, "comments" : { "$ref": "#/definitions/comments" } | ||
, "cases" : { "$ref": "#/definitions/testGroup" } | ||
} | ||
|
@@ -113,10 +113,17 @@ | |
, "pattern" : "^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$" | ||
}, | ||
|
||
"optional": | ||
{ "description": "An identifier for similar optional test cases (kebab-case)" | ||
, "type" : "string" | ||
, "pattern" : "^[a-z]+(-[a-z]+)*$" | ||
"scenario": | ||
{ "description": "An identifier for a specific scenario (kebab-case)" | ||
, "type": "string" | ||
, "enum": ["big-integer", "floating-point", "library-test", "unicode"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've taken the liberty of adding the actual values here, which makes the JSON schema validation a lot nicer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems easy to miss when adding a new scenario. Could we somehow merge both lists? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought of maybe having a CI check to verify that the two match? The benefit of the file is that is easier to read. This has the benefit of actually verifying the actual scenario values. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we regenerate the schema when the file changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But a check works too, this isn't blocking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We could. Good idea. |
||
}, | ||
|
||
"scenarios": | ||
{ "description": "An array of scenarios that can be used to include/exclude test cases" | ||
, "type" : "array" | ||
, "items" : { "$ref": "#/definitions/scenario" } | ||
, "minItems" : 0 | ||
}, | ||
|
||
"property": | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I've allowed the possiblity of also having scenarios at the test group level.