SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 753 forks source link

Registration of a ITestTracer plugin is ignored #565

Closed realtimeprojects closed 8 years ago

realtimeprojects commented 8 years ago

With Version 2.0.0.0 it is no longer possible to register a ITestTracer plugin according to the plugin documentation.

I've done this by following this descrition: http://stackoverflow.com/questions/22361281/how-to-set-up-individual-tracing-logging-with-specflow.

I debugged this stuff and found out that the RegisterCustomizations() Method is correctly called, however the registration of the plugin has no effects. I traced down the problem to the following commit: 3cf26480b24c8dcfc7e2f93751b06b963dccc73c

I guess the registration of the ITestTracer in "RegisterTestRunnerDefaults" disables any further registration of a ITestTracer plugin. By commenting out the last line, the registration works again. However, I have no idea how to "correctly" solve this issue.

    public void RegisterTestRunnerDefaults(ObjectContainer testRunnerContainer)
    {
        ...
        testRunnerContainer.RegisterTypeAs<TestTracer, ITestTracer>();
     }
samholder commented 8 years ago

@SabotageAndi is this related to https://github.com/techtalk/SpecFlow/pull/610

SabotageAndi commented 8 years ago

@samholder yes @realtimeprojects have a look here: https://github.com/techtalk/SpecFlow/wiki/Available-Containers-&-Registrations The ITestTracer registration is overridden on the test runner container. With the new Plugin infrastructure from #610 you will then be able to do also registrations on the test runner container.

samholder commented 8 years ago

So I'm going to close this issue as fixed by #610 and if after that is released and tested there are still issues a new issue can be raised.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.