Assaf,
It's several months past due, but if you face this situation again, you can
also use:
suite.addTest(new
com.nextnine.ServiceCenter.SCActivities.TestSCActivities(param1,
param2))
If you get a chance to try it out, let me know.
David Saff
On 3/8/07, Assaf Vizner <av...@ne...> wrote:
>
> David hi
>
> Thanks for the response.
>
> Indeed I'm using JUnit 3.8.2,
>
> Passing the instance into the test constructor is a little bit problematic
> since the TestCase signature doesn't allow getting any parameters, and the
> suite that triggers the tests can get either
>
> Class - suite.addTestSuite(
> com.nextnine.ServiceCenter.SCActivities.TestSCActivities.class);
>
> Or Test - suite.addTest(
> com.nextnine.ServiceCenter.SCActivities.TestSCActivities.suite);**
>
> I think I'll try to define the main Application class as singleton, in
> order to create the instance once and all the tests will access it through
> get method.
>
>
>
> *Asaf Vizner*
> *NextNine.LTD*
> *4 Ha-Nechoshet*
> *Tel-Aviv** 69710 Israel*
> *E-mail:** **av...@ne...*<https://mail.google.com/mail?view=cm&tf=0&to=av...@ne...>
> *Tel: +972(3)7673012*
> *Mobile**: +972(528)466746*
> *Fax: +972(3)6497810*
> ------------------------------
>
> *From:* dav...@gm...<https://mail.google.com/mail?view=cm&tf=0&to=dav...@gm...>[mailto:
> dav...@gm...<https://mail.google.com/mail?view=cm&tf=0&to=dav...@gm...>]
> *On Behalf Of *David Saff
> *Sent:* Tuesday, 06 March 2007 04:53
> *To:* Assaf Vizner
> *Subject:* Re: [Junit-devel] Passing object instance from a suite to a
> TestCase
>
>
>
> Assaf,
>
> It sounds like you're using JUnit 3. If so, your dynamic test suite could
> simply pass the instance into the constructors of the individual tests. But
> it's possible I'm missing the complexity of the situation. Could you share
> the source of your dynamic suite so far? Thanks,
>
> David Saff
>
> On 3/6/07, *Assaf Vizner* <av...@ne...<https://mail.google.com/mail?view=cm&tf=0&to=av...@ne...>>
> wrote:
>
> Hi
>
> I' m using Junit jointly with Watij (web application testing tool ), and I
> have created my own dynamic suite in order to allow my application to run
> different number of tests which provided as parameters.
>
> My problem is that I want my application to create the Watij IE (internet
> explorer) instance and to initialize it , and the Test Suite to send an
> instance of this object to the TestCase s.
>
> If anyone have any idea please replay to me
>
> Thanks
>
> *Asaf Vizner*
>
> *NextNine.LTD*
>
> *4 Ha-Nechoshet*
>
> *Tel-Aviv** 69710 Israel*
>
> *E-mail:** * *av...@ne...*<https://mail.google.com/mail?view=cm&tf=0&to=av...@ne...>
>
> *Tel: +972(3)7673012 *
>
> *Mobile: +972(528)466746 *
>
> *Fax: +972(3)6497810*
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Junit-devel mailing list
> Jun...@li...<https://mail.google.com/mail?view=cm&tf=0&to=Jun...@li...>
> https://lists.sourceforge.net/lists/listinfo/junit-devel
>
>
>
|