commander-cli/commander

View on GitHub
commander_windows.yaml

Summary

Maintainability
Test Coverage
tests:
  it should fail with invalid argument:
    command: commander.exe asfdf
    exit-code: 3

  it should display help:
    command: .\commander.exe
    stdout:
      contains:
        - "Commander - CLI app testing"
    exit-code: 0

  it should execute tests:
    command: commander.exe test ./integration/windows/commander_test.yaml
    stdout:
      contains:
        - "- [local] it should skip, was skipped"
        - test
    exit-code: 0

  it should assert that commander will fail:
    command: commander.exe test ./integration/windows/failing_suite.yaml
    stdout:
      contains:
        - ✗ [local] 'it will fail', on property 'ExitCode'
        - ✗ [local] 'test timeout' could not be executed with error message
        - "Count: 2, Failed: 2"
    exit-code: 1

  it should validate a big output:
    command: commander.exe test ./integration/windows/test_big_output.yaml
    stdout:
      contains:
        - ✓ [local] type integration\windows\_fixtures\big_out.txt
        - "Count: 1, Failed: 0"
    exit-code: 0

  test global and local configurations:
    command: commander.exe test ./integration/windows/config_test.yaml
    config:
      env:
        COMMANDER_FROM_SHELL: from_shell
    stdout:
      contains:
        - ✓ [local] should print global
        - ✓ [local] should print local
        - ✓ [local] should execute in given dir
        - ✓ [local] should work with timeout
    exit-code: 0

  test add command:
    command: commander.exe add --no-file --stdout echo hello
    stdout: |-
      tests:
        echo hello:
          exit-code: 0
          stdout: hello
    exit-code: 0

  test retries:
    command: commander.exe test integration/windows/retries.yaml
    stdout:
      contains:
        - ✗ [local] echo hello, retries 3
    exit-code: 1

  test stdin input:
    command: type integration\windows\stdin.yaml | commander.exe test -
    stdout:
      contains:
        - ✓ [local] hello world
    exit-code: 0