Skip to content
New issue

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

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

Already on GitHub? # to your account

Added ability to specify feature file and line numbers from command line #24

Closed
wants to merge 1 commit into from

Conversation

aharwood
Copy link

@aharwood aharwood commented Jan 1, 2013

Hi,

I've made a small enhancement to RuntimeOptionsBuilder to allow the specification of which feature file (and optionally line numbers) to run. It seems that this functionality was present in the old addCliFilter(RuntimeOptions) method, but was lost when moving to the new method (I assume because it didn't fit with the style). I've tried to implement it in keeping with how you've done the tags. I've also updated the README to include a section on what can be specified from the command line.

I believe this would allow Issue #11 to be closed.

Example usage:

grails test-app :cucumber features/search.feature:10:20

…rom the command line. The parser looks for arguments which contain ".feature" in the middle, with optional line numbers on the end. Updated README to document.
@hauner
Copy link
Owner

hauner commented Jan 5, 2013

Hi Adam,

The old addCliFilter was a bit dirty. Use of --options is tricky because grails eats them away. I tried using + instead but I did not like that.

I played around with your code and found a few things that could be improved.

  • cucumber accepts also directories and not just .feature files
  • prefixing of the files does not honor the featurePath configuration

I did not merge your code but it triggered implementation of the dir/file:line filter handling the cases above too.

thanks for working on this :-) !

I plan to release it next week as 0.8.0

@aharwood
Copy link
Author

aharwood commented Jan 6, 2013

Excellent, this functionality will be really handy. Looking forward to it!

@aharwood aharwood closed this Jan 6, 2013
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants