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

[idea] Detect unused steps #150

Open
Bertg opened this issue Jan 30, 2014 · 3 comments
Open

[idea] Detect unused steps #150

Bertg opened this issue Jan 30, 2014 · 3 comments

Comments

@Bertg
Copy link

Bertg commented Jan 30, 2014

We are going to a refactoring of our tests.
What we've started to see is that we have lingering test steps hanging around.

Is there a way to do the inverse of "missing steps"? If not, can you point me to the parts that I would need, and we'll build it and contribute back!

@dgarwood
Copy link

I second this option, from a more generic standpoint: running spinach --generate should be idempotent, creating steps that are missing, and tagging those that are not used as "depricated", or something like that, even if the step file already exists.

What I'm finding is that I write the feature, and then either find a different way to word the steps or there are parts of the feature I've missed, and need to add them after I've generated the step file.

If spinach were able to do this, it would save me a lot of time updating the step files when I need to make a change to the feature files, and the cost to "just do the simplest thing that works" now and change the feature later goes down, making it easier to write tests sooner and modify them when the business requirements change.

@Bertg
Copy link
Author

Bertg commented Oct 7, 2014

Any news on this?

@pedantic-git
Copy link
Contributor

I liked this idea so I implemented something that might go some way towards it: #194.

With my PR, if you add --audit, you'll get all the steps you're missing in a format you can copy & paste, and a list of files and line numbers for steps that are no longer in use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants