SWTBot UI Test [message #826824] |
Thu, 22 March 2012 14:52 |
Kollin Krause Messages: 18 Registered: March 2012 |
Junior Member |
|
|
Hello!
I use SWTBot to test my UI.
In my test i start the UI and close the welcome window:
SWTBotView eclipseView = bot.activeView();
if (eclipseView != null && view.getTitle().equals("Welcome")) {
eclipseView.close();
}
After that i set the perspective:
bot.perspectiveByLabel(perspective).activate();
And after that i will do this:
bot.menu("File").menu("New").menu("Java Project").click();
I will open a new java project and at this point i get an error like this:
Error in --> AbstractSWTBot.class:
public AbstractSWTBot(T w, SelfDescribing description) throws
WidgetNotFoundException {
if (w == null)
throw new WidgetNotFoundException("The widget was null.");
...
}
Error Trace:
org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: The widget was null.
at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:97)
at org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu.<init>(SWTBotMenu.java:42)
at org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu.menu(SWTBotMenu.java:96)
at com.dfe.esom.freezer.ui.graphic.UITest.createNewJavaProject(UITest.java:62)
Any ideas or hints what may be the cause of this?
Thanks!
[Updated on: Fri, 23 March 2012 13:33] Report message to a moderator
|
|
|
|
|
Re: SWTBot UI Test [message #831144 is a reply to message #829377] |
Wed, 28 March 2012 14:22 |
|
You should increase the permgen space in the launch of your swtbot test...
I usually do that by setting these arguments in the launch
-Xms40m -Xmx384m -XX:MaxPermSize=256m
hope this helps :)
cheers
Lorenzo
On 03/26/2012 09:59 AM, Kollin Krause wrote:
> Thank you very much ... it works, but after the code:
>
> bot.button("Next >").click();
>
> I create my new Project File with:
>
> bot.button("Finish").click();
>
> The project is created, but after a short while i get this error:
>
>
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.OutOfMemoryError: PermGen space
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(Unknown Source)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478)
>
> at
> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
>
> at
> org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
>
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
>
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
>
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
>
> at
> org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:260)
>
> at
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
>
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:327)
>
> at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
>
> at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1145)
> at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3921)
>
>
> Any ideas or hints what may be the cause of this?
> Thanks!
>
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
|
Powered by
FUDForum. Page generated in 0.03403 seconds