Warn or fail if duplicate features are detected #165

Closed
jvans opened this Issue Jan 22, 2012 · 3 comments

Projects

None yet

2 participants

jvans commented Jan 22, 2012

When I ran my single scenario test from Maven using Main, the generated report.js had my scenario listed twice. I will see if I can isolate this a little further to get a clearer picture of what is going on.

jvans commented Jan 23, 2012

Okay, figured out why this happens. If the feature path provided finds the same feature file twice (i.e. running from the root of your project with maven sees both src and target directories) then of course it reports the results of both feature scenarios. (Face a little red at the moment). I am not sure there is a way to prevent this. May want to warn folks about this somewhere in the documentation. If I made the mistake, it would seem possible that others might as well.

Owner

I renamed this issue. Possible solution: Build a checksum (MD5) of the feature source and store in a map: checksum->feature path

If a duplicate checksum is detected, raise an error.

jvans commented Jan 26, 2012

Your call on renaming, but I try to describe the problem in the title rather than the solution, because I have found that on teams this pre-supposes the solution which may not necessarily be the right one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment