Sha256: 73a55b22f129388fed744811448fcdae0e81d00c2dbb9dd09c354d633303dcf2

Contents?: true

Size: 1.92 KB

Versions: 14

Compression:

Stored size: 1.92 KB

Contents

@spawn
Feature: Running multiple formatters

  When running cucumber, you are able to using multiple different
  formatters and redirect the output to text files.
  Two formatters cannot both print to the same file (or to STDOUT)

  Background:
    Given a file named "features/test.feature" with:
    """
    Feature: Lots of undefined

      Scenario: Implement me
        Given it snows in Sahara
        Given it's 40 degrees in Norway
        And it's 40 degrees in Norway
        When I stop procrastinating
        And there is world peace
    """

  Scenario: Multiple formatters and outputs
    When I run `cucumber --no-color --format progress --out progress.txt --format pretty --out pretty.txt --no-source --dry-run --no-snippets features/test.feature`
    Then the stderr should not contain anything
    Then the file "progress.txt" should contain:
      """
      UUUUU

      1 scenario (1 undefined)
      5 steps (5 undefined)

      """
    And the file "pretty.txt" should contain:
      """
      Feature: Lots of undefined

        Scenario: Implement me
          Given it snows in Sahara
          Given it's 40 degrees in Norway
          And it's 40 degrees in Norway
          When I stop procrastinating
          And there is world peace

      1 scenario (1 undefined)
      5 steps (5 undefined)

      """

  Scenario: Two formatters to stdout
    When I run `cucumber -f progress -f pretty features/test.feature`
    Then it should fail with:
      """
      All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)
      """

  Scenario: Two formatters to stdout when using a profile
    Given the following profiles are defined:
      """
      default: -q
      """
    When I run `cucumber -f progress -f pretty features/test.feature`
    Then it should fail with:
      """
      All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)
      """

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
cucumber-2.99.0 features/docs/cli/specifying_multiple_formatters.feature
mobiusloop-0.1.5 features/docs/cli/specifying_multiple_formatters.feature
cucumber-3.0.0.pre.1 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.4.0 features/docs/cli/specifying_multiple_formatters.feature
mobiusloop-0.1.3 features/docs/cli/specifying_multiple_formatters.feature
mobiusloop-0.1.2 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.3.3 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.3.2 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.3.1 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.3.0 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.2.0 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.1.0 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.0.2 features/docs/cli/specifying_multiple_formatters.feature
cucumber-2.0.1 features/docs/cli/specifying_multiple_formatters.feature