Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken rerun format because of newline #1207

Closed
mkrei opened this issue Oct 4, 2017 · 5 comments
Closed

Broken rerun format because of newline #1207

mkrei opened this issue Oct 4, 2017 · 5 comments

Comments

@mkrei
Copy link

mkrei commented Oct 4, 2017

Summary

Recent change of the output of rerun feature seems to break the feature by producing a content in the output file, which can not be read in again.
This is probably related to commit 488ea4d

Up until recently (probably before ) the workflow of running a cucumber suite with -f rerun --out rerun.txt followed by cucumber @rerun.txt to run failed tests again worked properly. It wrote a string in the file, e.g. test.feature:3:14 test2.feature:5 and ran those tests again.
Now cucumber will replace the space between the two feature files with \n resulting in test.feature:3:14\ntest2.feature:5 which can not be read properly. It will complain with

Expected Behavior

When I run a feature suite with -f rerun -- rerun.txt I expect cucumber to procude a file called rerun.txt which contains a valid description of the failed scenarios, so I can use them as input for a second run, e.g. by running cucumber @rerun.txt

Current Behavior

When running the suite with -f rerun -- rerun.txt, the file will contain a string like test.feature:3:14\ntest2.feature:5 instead of formerly test.feature:3:14 test2.feature:5, which cucumber can not parse, but instead fails with

No such file or directory - \ntest2.feature:5. You can use cucumber --init to get started.

Possible Solution

Fix or revert the mentioned commit regarding the use of newlines in the rerun output file

Steps to Reproduce (for bugs)

  1. Have a cucumber suite with at least two failing tests, each in a separate feature files
  2. Run cucumber -f rerun --out somefile
  3. Run cucumber @somefile

Your Environment

  • Version used: ruby 2.3.1p112, cucumber 3.0.1
  • Operating System and version: Ubuntu 16.04
@brasmusson
Copy link
Contributor

Yes, the rerun feature was broken. The rerun formatter shall separate feature file entries with newline (see #1162), unfortunately 488ea4d made the rerun formatter instead print '\n' literately instead of newlines.

@tooky
Copy link
Member

tooky commented Oct 5, 2017

@brasmusson I think we should do a patch release for this fix? I'm happy to do it later today or tomorrow?

@summittracker
Copy link

Was this fixed in a new version of cucumber?

@aslakhellesoy
Copy link
Contributor

@summittracker yes: https://github.com/cucumber/cucumber-ruby/blob/master/CHANGELOG.md#302-2017-11-11

@lock
Copy link

lock bot commented Dec 7, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants