StdErr output is after StdOut in step definition `the output should contain`
- Dominant language
- Ruby
- Stars
- 966
- Forks
- 162
- Avg merge
- 18h 51m
- Merged PRs (30d)
- 8
Description
## 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.
Contributor guide
Research direction
Reproduce the mixed StdErr/StdOut case with Aruba 1.0.0 and 0.14.4, then locate the step definition for `the output should contain`. Trace how the two streams are combined and ensure the comparison preserves their original sequence; verify the behavior with a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100