From: Jeff <predato...@gmail.com>
Date: Thu, 6 Oct 2011 10:29:36 -0600
Local: Thurs, Oct 6 2011 12:29 pm
Subject: Re: [testng-users] Guice Constructor Injection with TestNG
...not trying to be too big of a pain, but any thoughts/discussion on One specific question that I still don't know ... if my class is If so, I think I just need to inject the resouces in the @BeforeClass method Has anyone else wrestled with this? I'm curious how you handle On Wed, Oct 5, 2011 at 11:38 AM, Jeff <predato...@gmail.com> wrote: -- > The resource in question is a Selenium2 WebDriver object. > The @Tests in my test class(es) represent a sequence of steps in a > In the past, I've used two approaches: > 1. Each class creates it's own WebDriver object, where the class was > I'm looking to learn/try Guice/DI to inject the correct WebDriver object > Hopefully that made sense. > 2011/10/5 Cédric Beust ♔ <ced...@beust.com> >> Hi Jeff, >> I'm not sure I see the problem with injecting in a multithreaded context >> But maybe I'm missing something? >> -- >> On Tue, Oct 4, 2011 at 3:53 PM, Jeff <predato...@gmail.com> wrote: >>> Guice "Best Practices" recommends using constructor injection to create >>> If I create a custom Guice Module/Provider to handle injecting >>> @Test >>> Or, similarly @BeforeClass method injection (assumes the class is marked >>> @BeforeClass >>> I considered Field Injection at the test class level, but I don't >>> Is there a better way to tie resources to the test threads (particularly >>> -- >>> Jeff Vincent >>> -- >> -- > -- Jeff Vincent predato...@gmail.com See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent I ♥ DropBox <http://db.tt/9O6LfBX> !! You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||