Cucumber-js: CLI output for new features

Created on 31 May 2016  ·  7Comments  ·  Source: cucumber/cucumber-js

I'm porting over some tests to Cucumber-js, last time I used Cucumber was with Ruby. With the Ruby version when you would run the Cucumber CLI tool it would give you a list of Steps for you to complete. With the JS version the output is a mixed of comments and the steps as seen below

Is there a flag to just output the steps rather than copying each block of code out from the terminal?

screenshot 2016-05-31 17 03 36

Most helpful comment

Hmm. Interesting idea. There is nothing that supports that at the moment. We could add a new formatter that just outputs snippets for undefined steps or this could be something we combine with a usage formatter.

All 7 comments

Hmm. Interesting idea. There is nothing that supports that at the moment. We could add a new formatter that just outputs snippets for undefined steps or this could be something we combine with a usage formatter.

What would be good is to be able to have a flag of --output-steps file.js or just --output-steps for dumping to console

+1 for that feature. It would very helpful for an automated workflow from features to a code skeleton with minimal manual effort.

I opened another entry (#618) on the same subject, and charlierudolph pointed me to this one.

I just made a comment there. Below is a copy of it:


Thanks for the pointer. Sure sounds like a good idea.
It could/would disrupt people that have automated and created some scripts/filter, but I would say this should be the default behaviour. 1) It would be closer to cucumber, 2) filters are likely to work the same. It would be great for people that just cut&paste from the output of some CI.

So in short, I would prefer it to be the default, if not, then sure have the option to output just that.

Thanks

+1 for this feature.

We now have a snippets formatter which can be used to get just the snippets. That will be available in the next release.

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.

Was this page helpful?
0 / 5 - 0 ratings