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

Finer-grained control over output of Attachments #1160

Closed
goofballLogic opened this issue Dec 6, 2018 · 3 comments
Closed

Finer-grained control over output of Attachments #1160

goofballLogic opened this issue Dec 6, 2018 · 3 comments

Comments

@goofballLogic
Copy link

This seems to be the same as a recent closed/abandoned issue: #1148

Per discussion https://stackoverflow.com/questions/53613111/cucumber-js-prevent-attachments-swamping-output/53618285?noredirect=1#comment94135284_53618285 this is a feature request to control whether or not attachments get automatically output from the default reporters (like Progress).

Per the documentation (https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/attachments.md):

Attachments are also printed by the progress, progress-bar and summary formatters. They appear right after the step and only text/plain content is visible. It can be used to debug scenarios, especially in parallel mode.

However, sometimes I attach text/plain content which I don't want cluttering up the output, especially on a minimalist fomatter like progress.

A practical example from my current project is the HTML of a web page which I am testing via cucmberjs -> Selenium. This only gets attached in the event of a failing scenario, and is only used if a test run fails in the context of a continuous delivery pipeline. When running the tests locally, developers don't want that massive attachment swamping all other screen output. (text/plain content type is needed for compatibility with downstream reporters we use later in our processes).

I note that the decision to only emit text/plain attachments seems somewhat arbitrary (albeit a good compromise). It would be nice if I had some control over what attachments get output. I'm not sure if this is a feature request for cucumberjs or whether it's for one/more formatters.

@Izhaki
Copy link
Contributor

Izhaki commented Dec 6, 2018

Possible duplicate of #1136 ?

@goofballLogic
Copy link
Author

Agreed @Izhaki will add a note there and close this one.

@lock
Copy link

lock bot commented Dec 6, 2019

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 6, 2019
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

2 participants