Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » NPE while recording(NPE is thrown while recording using SWTBot)
NPE while recording [message #1075380] Mon, 29 July 2013 10:30 Go to next message
Tilak Sharma is currently offline Tilak SharmaFriend
Messages: 48
Registered: July 2009
Member
Hi,

We are evaluating SWTBot for testing our RAP solution.
We are following this video http://vimeo.com/55953990 which is mentioned here: http://wiki.eclipse.org/SWTBot/Generator

As part of our testing, while we were trying to start recording using SWTBot, we are seeing the below NPE and recorder does not work Sad


!ENTRY org.eclipse.ui 4 0 2013-07-29 15:23:00.873
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.swtbot.generator.ui.RecorderDialog$4.handleCodeGenerated(RecorderDialog.java:122)
	at org.eclipse.swtbot.generator.ui.BotGeneratorEventDispatcher.dispatchCodeGenerated(BotGeneratorEventDispatcher.java:176)
	at org.eclipse.swtbot.generator.ui.BotGeneratorEventDispatcher.processRules(BotGeneratorEventDispatcher.java:131)
	at org.eclipse.swtbot.generator.ui.BotGeneratorEventDispatcher.handleEvent(BotGeneratorEventDispatcher.java:88)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
	at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1667)
	at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2151)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4608)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2075)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4977)
	at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:3141)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)


We need to have this recorder running so that we can continue with our testing.

Does SWTBot support testing RAP applications? If not, what are other alternative tools?

Please help.

Thanks in anticipation,
Tilak
Re: NPE while recording [message #1075468 is a reply to message #1075380] Mon, 29 July 2013 13:29 Go to previous message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 771
Registered: July 2009
Location: Grenoble, France
Senior Member
On 07/29/2013 12:30 PM, Tilak Sharma wrote:

> As part of our testing, while we were trying to start recording using
> SWTBot, we are seeing the below NPE and recorder does not work :(
>
> !ENTRY org.eclipse.ui 4 0 2013-07-29 15:23:00.873
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.NullPointerException
> at
> org.eclipse.swtbot.generator.ui.RecorderDialog$4.handleCodeGenerated(RecorderDialog.java:122)

This looks like a bug, However I have to admit that the recorder is not
tested on RAP for now.
You can open a Bugzilla entry and give details about this error (how you
start recorder, which UI actions do you perform, when do you get the
issue... and everything that could help to reproduce the bug in a very
simple use-case).

> Does SWTBot support testing RAP applications? If not, what are other
> alternative tools?

To be honest, I never found an answer to this question. Cf
http://www.eclipse.org/forums/index.php/t/9079/
AFAIK, no-one in SWTBot community has tried SWTBot on RAP so the
question is still open.
AFAIK, none of current active contributors has plan for testing SWTBot
on RAP, so it would be great if you could give it a try and report the
issues/success of running SWTBot over RAP.

HTH
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Previous Topic:Trying to run SWTBot 2.1.1 fails - VerifyError
Next Topic:How to select an Item in ComboBox of a Tree..
Goto Forum:
  


Current Time: Mon Dec 22 20:08:05 GMT 2014

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

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