bind step definition from a different project in different solution
We can call a step definition from two different projects using <stepAssemblies>
<stepAssembly assembly="assembly name" />
But My doubt is , can we call a step definition from a project residing in a different solution. the other project is exposed as nuget package .
Looking for any help/thoughts/suggestions .
To be honest, this is something I have never tried. Even if it does work, I wouldn't recommend it.
Can I ask, what is your need to do this? It will give me some insight into how users are using SpecFlow and their use cases.0
Hi Jordan Western Thanks for your thought.
We are trying to keep step definitions in a different project under different different solutions and publish them as a nuget package so that other teams can use it. Intention is that that teams will write their own feature file and import step definition nuget so that it becomes a ready to use artifact for them.
We do not want to keep all the projects under same solution to reduce tight coupling and also may lead to access issue for other team.
An alternative can be , we write public methods and publish them as nuget. Other team write their own feature file, step definitions and use public methods from definition file.0
I've not come across this use case before at all so it's an interesting one! But if it works for you and provides value to you and your team then give it a go!0
Has there been any update on whether this is possible? I am looking to do something similar?0
This can be done in same way .In the Assembly name section, you need to provide the assembly name of different projects. Jack OLoughlin
<stepAssembly assembly="project2" />
<stepAssembly assembly="project3" />
Please sign in to leave a comment.