Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » how to use multiple @RunWith annotations
how to use multiple @RunWith annotations [message #707886] Tue, 02 August 2011 07:22 Go to next message
Aparna Argade is currently offline Aparna ArgadeFriend
Messages: 18
Registered: October 2010
Junior Member
I want to run my swtbot test with two runners. e.g. Parameterized.class and SWTBotJunit4ClassRunner.class.
I want both the runners because my test works on different sets of data and also I want screenshots on failures.
Compiler doesn't allow me to specify two runners with 2 different @RunWith statements. It also doesn't allow me to specift comma separated arguments in a single @RunWith statement.

What should I do to specify the multiple runners?
Re: how to use multiple @RunWith annotations [message #708337 is a reply to message #707886] Tue, 02 August 2011 17:31 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
On 8/2/11 12:22 AM, Aparna wrote:
> I want to run my swtbot test with two runners. e.g. Parameterized.class
> and SWTBotJunit4ClassRunner.class. I want both the runners because my
> test works on different sets of data and also I want screenshots on
> failures.
> Compiler doesn't allow me to specify two runners with 2 different
> @RunWith statements. It also doesn't allow me to specift comma separated
> arguments in a single @RunWith statement.
>
> What should I do to specify the multiple runners?
>

You'd likely have to subclass from one of the runners and mix in
functionality from the other to achieve this. See an example of
SWTBotApplicationLauncherClassRunner for how this is achieved.

-- Ketan
Previous Topic:Want to access CommandContributionItem through SWTBot
Next Topic:SWTBot headless problem
Goto Forum:
  


Current Time: Thu Nov 27 17:48:03 GMT 2014

Powered by FUDForum. Page generated in 0.02531 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software