You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- `tags`: a yaml list of tag names, see [the list of canonical tags below](#tags-for-conformance-tests).
123
+
124
+
Because this is a `schema-salad` processed document, `$import` can be used to organize the tests into separate files.
125
+
126
+
Currently, the main file is too big (over 3400 lines); we are slowly re-organizing it.
127
+
128
+
Eventually it would be good to organize the tests so that the test for each optional feature and other logical groups of tests are in their own separate file;
129
+
with the supporting CWL documents and their inputs in separate sub-folders of `tests` as well.
adds all the entries in [`tests/string-interpolation/test-index.yaml`](https://github.com/common-workflow-language/cwl-v1.2/blob/main/tests/string-interpolation/test-index.yaml)
133
+
as entries in the main conformance test file.
134
+
135
+
## Output matching
136
+
137
+
In each test entry there is an `output` field that contains a mapping of the expected outputs names and their values.
138
+
139
+
If a particular value could vary and it doesn't matter to the proper functioning of the test, then it can be represented by the special token `Any`.
140
+
141
+
At any level, if there is an extra field, then that will be considered an error.
142
+
An exception to this is `class: File` and `class: Directory` objects, the `cwl-runner` under test can add additional fields here.
143
+
Likewise, if you don't want to test some aspect of a `class: File` or `class: Directory` object (like `nameext`) you can just omit it.
144
+
145
+
[According to the CWL standards](https://www.commonwl.org/v1.2/CommandLineTool.html#File), the format of the `location` field in
146
+
`class: File` and `class: Directory` is implementation specific and we should not be testing them.
147
+
Please remember to use `location: any` for them.
148
+
149
+
Currently, we do [test the contents of the location field in some older tests, but we should stop](https://github.com/common-workflow-language/common-workflow-language/issues/930)
150
+
If you are editing those old tests, you may be interested in some special processing for `class: File` and `class: Directory` output objects:
151
+
any `location` value specified will succeed if there is either an exact match to the real output, or it matches the end of the real output.
152
+
Additionally, for `class: Directory` the location reported by the actual execution will have any trailing forward slash (`/`) trimmed off before comparison.
153
+
154
+
## Writing a new conformance test
155
+
156
+
To add a new conformance test:
157
+
1. Ensure the CWL description you have tests the desired feature or aspect.
158
+
2. Run your test using the CWL reference runner (`cwltool`) or another CWL runner
159
+
that shows the correct behavior to collect the output, or confirm that validation/execution fails as expected
160
+
3. Add the CWL description and output object to the subdirectory `tests` in this repository.
161
+
4. Fill out a new entry in [conformance_tests.yaml](conformance_tests.yaml) following the [format of the conformance test file](#format-of-the-conformance-test-file)
162
+
5. Send a pull request to [current staging branch for the next revision of the CWL standards](https://github.com/common-workflow-language/cwl-v1.2/tree/1.2.1_proposed)
163
+
with your changes
164
+
47
165
## Tags for conformance tests
48
166
49
167
Each test in the [conformance_tests.yaml](conformance_tests.yaml) should be tagged with one or more tags.
0 commit comments