Skip to content

StdErr output is after StdOut in step definition the output should contain #705

@archerzz

Description

@archerzz

Summary

I found that in version 1.0.0, the contents of StdOut and StdErr do not keep their original sequence in step definitions like the output should contain. More specific, StdErr is after StdOut.

Version 0.14.x is fine. So I think this should be a regression.

Expected Behavior

The output of StdErr and StdOut should keep their original sequence in step definitions like the output should contain.

Current Behavior

If the app prints some contents to StdErr first, and then to StdOut, like below:

Errors
Normal

We write the scenario according to the actual output.

However in step definitions like the output should contain, it will treat the output like:

Normal
Errors

Thus the comparison will fail.

Possible Solution

Roll back to old versions.

Steps to Reproduce (for bugs)

  1. Try an CLI app which will print to StdErr before StdOut
  2. Compose and run a BDD test case under version 1.0.0
  3. Compose and run a BDD test case under old versions, like 0.14.4

Context & Motivation

This will break CLI apps which mix StdOut and StdErr outputs (like put some warning messages between normal output)

Your Environment

  • Version used: 1.0.0
  • Operating System and version: all
  • Link to your project: N/A Sorry I could not provide it, since it's not an open source project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions