Comments on: SpecFlow tips: Customizing dependency injection with Autofac https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/ coach, trainer and bdd addict, creator of SpecFlow; owner of Spec Solutions Fri, 16 Dec 2016 07:06:19 +0000 hourly 1 https://wordpress.org/?v=6.9 By: Gáspár https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-213 Fri, 16 Dec 2016 07:06:19 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-213 In reply to Daniel Dec (@_decu_).

That would be great, thx!

]]>
By: Daniel Dec (@_decu_) https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-212 Thu, 15 Dec 2016 22:21:36 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-212 In reply to Gáspár.

Yes, it seems to be. So I needed to create a fake binding in my Specification proj (as we have got separation between specification and steps implementation) and it took my [ScenarioDependencies]. Thanks for help. I would try to investigate that in a free time and if I find how ti fix that then I will call for a PR.

]]>
By: Gáspár https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-211 Thu, 15 Dec 2016 21:49:48 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-211 In reply to Daniel Dec (@_decu_).

Hi!
I was not considering this use case to be honest. Is this the same problem as described here: https://github.com/gasparnagy/SpecFlow.Autofac/issues/2?
Br,
Gaspar

]]>
By: Daniel Dec (@_decu_) https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-210 Thu, 15 Dec 2016 21:36:11 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-210 Thanks for that post. As I`m playing with Specflow.Autofac plugin I found that if I use
… in my base Specflow configuration (Specification project) then [ScenarioDependencies] is not visible if I`m trying to register StepsDefinition from one of attached assemblies (I`m getting an exception from ContainerBuilderFinder.GetCreateScenarioContainerBuilder()) with “Unable to find scenario dependencies!”).

It works fine when I create a static class in my assembly. Is that desired behaviour or I might be doing something wrong?

]]>
By: Gáspár https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-207 Mon, 12 Dec 2016 12:20:31 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-207 In reply to Mike.

Hi Mike!
I haven’t seen such issue yet. Could you please open an issue for this on GitHub (to the SpecFlow.Autofac or into your repo) with the details (stack trace) and send me the link to it?
Br,
Gaspar

]]>
By: Mike https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-206 Mon, 12 Dec 2016 11:27:17 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-206 Hi Gáspár,

Thanks for this post, I’ve created a Specflow.Ninject project using the example Specflow.Autofac project. All was well however now I’m getting a couple of exceptions when trying to run my tests with parallel execution turned on (using a selenium grid) and when trying to inject the ScenarioContext into one of my hooks classes (unable to resolve scenariocontext using the ninject kernel). I was wondering have you or anyone else encountered any issues with these two scenarios using a custom DI container?

Thanks,
Mike

]]>
By: Paul Hatcher https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-203 Fri, 11 Nov 2016 13:21:54 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-203 Gaspar, wrote the equivalent for Unity – SpecFlow.Unity and its on NuGet and GitHub

]]>
By: Fahad https://gasparnagy.com/2016/08/specflow-tips-customizing-dependency-injection-with-autofac/#comment-199 Sun, 18 Sep 2016 11:52:48 +0000 http://gasparnagy-com.lku.dkk.mybluehost.me/?p=860#comment-199 Hi, thanks for the great blog post. I took you example and created one for Unity. I’d like to share but not sure how.

]]>