Skip to content

Commit 5437b45

Browse files
committed
Add chnagelog and docs
1 parent 1ff76af commit 5437b45

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v2.3.0
2+
3+
- Add property `skip`, adds the ability to skip test cases
4+
15
# v2.2.0
26

37
- Move from `github.com/SimonBaeumer` to `github.com/commander-cli`

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ For more information take a look at the [quick start](#quick-start), the [exampl
4141
* [not-contains](#not-contains)
4242
* [xml](#xml)
4343
- [stderr](#stderr)
44+
- [skip](#skip)
4445
+ [Config](#user-content-config-config)
4546
- [dir](#dir)
4647
- [env](#env)
@@ -146,6 +147,11 @@ tests:
146147
stdout: hello # Default is to check if it contains the given characters
147148
exit-code: 0 # Assert exit-code
148149

150+
it should skip:
151+
command: echo "I should be skipped"
152+
stdout: I should be skipped
153+
skip: true
154+
149155
it should fail:
150156
command: invalid
151157
stderr:
@@ -162,7 +168,8 @@ tests:
162168
xml:
163169
"//book//auhtor": Steven King # Make assertions on xml documents
164170
exit-code: 127
165-
171+
skip: false
172+
166173
it has configs:
167174
command: echo hello
168175
stdout:
@@ -536,6 +543,20 @@ See [stdout](#stdout) for more information.
536543
line-count: 1
537544
```
538545

546+
#### skip
547+
548+
`skip` is a `boolean` type, setting this field to `true` will skip the test case.
549+
550+
- name: `skip`
551+
- type: `bool`
552+
- default: `false`
553+
554+
```yaml
555+
echo test:
556+
stdout: test
557+
skip: true
558+
```
559+
539560
### <a name="config-config"></a>Config
540561

541562
You can add configs which will be applied globally to all tests or just for a specific test case, i.e.:

examples/commander.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ tests:
2222
exit-code: 127
2323

2424
it should skip:
25-
command: echo hello
25+
command: echo "I should be skipped"
26+
stdout: I should be skipped
2627
skip: true

0 commit comments

Comments
 (0)