Skip to main content

bind step definition from a different project in different solution

Comments

5 comments

  • Jordan Western

    Hi Arunangshu Jana (IN),

    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
  • Arunangshu Jana (IN)

    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
  • Jordan Western

    Hi Arunangshu Jana (IN),

    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
  • Jack OLoughlin

    Has there been any update on whether this is possible? I am looking to do something similar?

    Jordan Western Arunangshu Jana (IN)

    0
  • Arunangshu Jana (IN)

    This can be done in same way .In the Assembly name section, you need to provide the assembly name of different projects. Jack OLoughlin

    <specFlow>
            <stepAssemblies>
              <stepAssembly assembly="project1"/>
              <stepAssembly assembly="project2" />
              <stepAssembly assembly="project3" />
            </stepAssemblies>
        </specFlow>
    0

Please sign in to leave a comment.

Powered by Zendesk