Alex S.
2016-04-20 18:48:30 UTC
Hi guys!
I have a problem with step inheritance in my project.
The structure is: I have a base test library which I use as a NuGet
package, and I have 3 other test projects in which I use it.
Base library has BasicSteps.cs marked with [Binding] attribute, all project
step files are inherited from this file. In this file I have a step which
allows me to refresh webpage, and I was using it in all projects without
any problems until v.2.0.0.
Now whenever I try to use this step, it gives me "Ambiguous step
definition" and lists "BasicSteps.RefreshPage()" several times - basically,
once per each step file inherited from BasicSteps.
I guess something has changed in SpecFlow that pushes the idea of NOT using
step inheritance even further. Ok, if that's the way it is now, what other
options do I have to use common steps (refresh the page, go to URL) across
several projects without creating them more than once? What makes it harder
in my case, all my 3 projects may be used together, as in:
BaseTestLibrary
Project1 references BaseTestLibrary
Project2 references BaseTestLibrary
Project3 references BaseTestLibrary, Project1 and Project2
So even if I specify step "When I refresh the page" in each of them, I'll
still get that "ambiguous step definition" problem.
Any ideas?
Thanks,
Alex.
I have a problem with step inheritance in my project.
The structure is: I have a base test library which I use as a NuGet
package, and I have 3 other test projects in which I use it.
Base library has BasicSteps.cs marked with [Binding] attribute, all project
step files are inherited from this file. In this file I have a step which
allows me to refresh webpage, and I was using it in all projects without
any problems until v.2.0.0.
Now whenever I try to use this step, it gives me "Ambiguous step
definition" and lists "BasicSteps.RefreshPage()" several times - basically,
once per each step file inherited from BasicSteps.
I guess something has changed in SpecFlow that pushes the idea of NOT using
step inheritance even further. Ok, if that's the way it is now, what other
options do I have to use common steps (refresh the page, go to URL) across
several projects without creating them more than once? What makes it harder
in my case, all my 3 projects may be used together, as in:
BaseTestLibrary
Project1 references BaseTestLibrary
Project2 references BaseTestLibrary
Project3 references BaseTestLibrary, Project1 and Project2
So even if I specify step "When I refresh the page" in each of them, I'll
still get that "ambiguous step definition" problem.
Any ideas?
Thanks,
Alex.
--
You received this message because you are subscribed to the Google Groups "SpecFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specflow+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "SpecFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to specflow+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.