Skip to content

Commit

Permalink
Add chnagelog and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhitt committed Aug 6, 2020
1 parent 1ff76af commit 5437b45
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.3.0

- Add property `skip`, adds the ability to skip test cases

# v2.2.0

- Move from `github.com/SimonBaeumer` to `github.com/commander-cli`
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ For more information take a look at the [quick start](#quick-start), the [exampl
* [not-contains](#not-contains)
* [xml](#xml)
- [stderr](#stderr)
- [skip](#skip)
+ [Config](#user-content-config-config)
- [dir](#dir)
- [env](#env)
Expand Down Expand Up @@ -146,6 +147,11 @@ tests:
stdout: hello # Default is to check if it contains the given characters
exit-code: 0 # Assert exit-code

it should skip:
command: echo "I should be skipped"
stdout: I should be skipped
skip: true

it should fail:
command: invalid
stderr:
Expand All @@ -162,7 +168,8 @@ tests:
xml:
"//book//auhtor": Steven King # Make assertions on xml documents
exit-code: 127

skip: false

it has configs:
command: echo hello
stdout:
Expand Down Expand Up @@ -536,6 +543,20 @@ See [stdout](#stdout) for more information.
line-count: 1
```

#### skip

`skip` is a `boolean` type, setting this field to `true` will skip the test case.

- name: `skip`
- type: `bool`
- default: `false`

```yaml
echo test:
stdout: test
skip: true
```

### <a name="config-config"></a>Config

You can add configs which will be applied globally to all tests or just for a specific test case, i.e.:
Expand Down
3 changes: 2 additions & 1 deletion examples/commander.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ tests:
exit-code: 127

it should skip:
command: echo hello
command: echo "I should be skipped"
stdout: I should be skipped
skip: true

0 comments on commit 5437b45

Please sign in to comment.