|
Re: Login Check in SWTBOT Against RCP [message #531890 is a reply to message #531843] |
Thu, 06 May 2010 13:05 |
Pascal G Messages: 157 Registered: July 2009 |
Senior Member |
|
|
yogeshkumar wrote:
> Hi All,
>
> I have a scenario like
> I need to check the login for a RCP based application.
>
> I have created a class, which contains SWTBOT features.
>
> I have created one method too like .
>
> public void testOpenAnotherView ()throws Exception{
> System.out.println("Inside testOpenAnotherView ");
> bot.textWithLabel("User-ID").setText("username");
> bot.textWithLabel("Password").setText("password");
> bot.button("Login").click();
> System.out.println("Exit testOpenAnotherView ");
> }
>
> I have run the class against the RCP product. The application Loginpage
> loads
>
> But it was not loging in, Even i am not recieving the System.out.println.
>
> Please let me know what will be the issue.
>
> Please help in resolving the issue.
>
> Thanks and Regards,
> Yogeshkumar.S
>
If I understand correctly your problem, you have to login before using
the RCP application, right? You get a login screen, then if you are
correctly logged-in the RCP application start.
However, this is not possible to test with SWTBot because of the
internal mechanics of Eclipse/RCP/OSGi. For your test case to run, the
RCP application must be running.
To make things clearer (I hope), here is a "diagram":
Loginpage ---launch---> RCP (OSGi runtime) ---launch---> SWTBot tests
The usual workaround for this is to deactivate login while you test, or
to log in using command-line argument (if it's supported by your
application).
Hope this helps.
--
Pascal Gélinas | Software Developer
*Nu Echo Inc.*
http://www.nuecho.com/ | http://blog.nuecho.com/
*Because performance matters.*
|
|
|
Re: Login Check in SWTBOT Against RCP [message #532472 is a reply to message #531890] |
Mon, 10 May 2010 07:58 |
yogeshkumar Messages: 22 Registered: April 2010 |
Junior Member |
|
|
Hi All,
I am getting error when I run my SWTBOT code.
Exception in thread "WorkbenchTestable" java.lang.IllegalArgumentException: No Classloader found for plug-in SampleSWTBotExample
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.getCl assLoader(RemotePluginTestRunner.java:79)
at org.eclipse.swtbot.eclipse.core.RemotePluginTestRunner.getTe stClassLoader(RemotePluginTestRunner.java:73)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadC lass(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadC lasses(RemoteTestRunner.java:425)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:445)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:386)
Please help me in fixing this issue.
Thanks and Regards,
Yogeshkumar.S
[Updated on: Mon, 10 May 2010 08:09] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03187 seconds