Home » Eclipse Projects » SWTBot » SWTbot fails with RCP that takes arguments
SWTbot fails with RCP that takes arguments [message #644910] |
Tue, 14 December 2010 17:23 |
Fredrik Lindqvist Messages: 13 Registered: November 2009 |
Junior Member |
|
|
We have a RCP that can take command line arguments, if we get unknown arguments we throw an exception.
When we try to run SWTbot on the RCP we get that exception. Debugging show that our RCP get the following arguments:
[-keepalive, -version, 3, -port, 55255, -testLoaderClass, org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader, -loaderpluginname, org.eclipse.jdt.junit4.runtime, -classNames, BaseTest, -testApplication, app.gui.application, -testpluginname, MyTest]
Since these are unknown arguments, we get an exception.
The run configuration is pretty basic, instead of starting up the workbench, we start up the application. Like it has been suggested in all tutorials on the net.
Our code get the arguments from org.eclipse.equinox.app.getArguments().get("application.args")
My guess: SWTBot adds application arguments but doesn't remove them before starting up the RCP application.
|
|
|
Re: SWTbot fails with RCP that takes arguments [message #645406 is a reply to message #644910] |
Fri, 17 December 2010 04:41 |
Ketan Padegaonkar Messages: 873 Registered: July 2009 |
Senior Member |
|
|
Hi Fred,
You'd likely get a different set of arguments based on whether you're
debugging or running normally, your version of junit, and other things.
Eclipse normally does not error out on arguments it does not
understand(primarily so that other plugins can read those arguments and
do something interesting with them). SWTBot continues to follow this
philosophy and I'd suggest that your app does too.
This effectively means that you leave room for other plugins(including
swtbot) to be able to do interesting things with those arguments :)
--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr
On 12/14/10 9:23 AM, Fred wrote:
> We have a RCP that can take command line arguments, if we get unknown
> arguments we throw an exception.
> When we try to run SWTbot on the RCP we get that exception. Debugging
> show that our RCP get the following arguments:
>
>
> [-keepalive, -version, 3, -port, 55255, -testLoaderClass,
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader,
> -loaderpluginname, org.eclipse.jdt.junit4.runtime, -classNames,
> BaseTest, -testApplication, app.gui.application, -testpluginname, MyTest]
>
>
> Since these are unknown arguments, we get an exception.
> The run configuration is pretty basic, instead of starting up the
> workbench, we start up the application. Like it has been suggested in
> all tutorials on the net.
>
> Our code get the arguments from
> org.eclipse.equinox.app.getArguments().get("application.args ")
>
> My guess: SWTBot adds application arguments but doesn't remove them
> before starting up the RCP application.
|
|
| |
Goto Forum:
Current Time: Thu Apr 25 06:16:44 GMT 2024
Powered by FUDForum. Page generated in 0.03044 seconds
|