hedgehog / Cuken / Docs / Command examples
Executing commands
In order to test a running local system As an administrator I want to use Aruba steps to run commands and test output
Background:
- Given that "
cuken/cmd" has been required
Scenario: Check Stdout
- When I run `echo 'i like cheese'`
- Then the stdout from "
echo 'i like cheese'" contains "i like cheese"
Scenario: Check Stderr
- When I run `some_error`
- Then the stderr from "
some_error" contains "No such file or directory - some_error"
Scenario: Check Stdout for multiple lines
- When I run `echo 'one\none\none\n'`
- Then the output contains:
text
one one one
Scenario: Check exit code
- When I run `true`
- Then the exit status should be 0
Scenario: Check exit code
- When I run `false`
- Then the exit status should be 1
Source: features/command_examples/commands.feature at commit efec2546, Cuken (Apache-2.0 license).