Skip to main content



      Home
Home » Archived » Jubula » Error seen everytime I start AUT from Jubula(o.e.j.r.s.c.AUTSwingHierarchy - Method called outside of the dispatch thread)
Error seen everytime I start AUT from Jubula [message #1724604] Wed, 24 February 2016 15:49 Go to next message
Eclipse UserFriend
I am new to Jubula and successfully ran through the samples and am able to start writing test on our own swing application.

I noticed this error everytime I start the AUT:

2016-02-16 12:43:52.542 [Thread-7] ERROR o.e.j.r.s.c.AUTSwingHierarchy - Method called outside of the dispatch thread. This may indicate a potential error in the AUT.
java.lang.Exception: null
at org.eclipse.jubula.rc.swing.components.AUTSwingHierarchy.checkDispatchThread(AUTSwingHierarchy.java:1018) [org.eclipse.jubula.rc.swing_4.0.0.201602030740.jar:na]
at org.eclipse.jubula.rc.swing.components.AUTSwingHierarchy.name(AUTSwingHierarchy.java:757) [org.eclipse.jubula.rc.swing_4.0.0.201602030740.jar:na]
at org.eclipse.jubula.rc.swing.components.AUTSwingHierarchy.addToHierarchyDown(AUTSwingHierarchy.java:695) [org.eclipse.jubula.rc.swing_4.0.0.201602030740.jar:na]
at org.eclipse.jubula.rc.swing.components.AUTSwingHierarchy.addComponent(AUTSwingHierarchy.java:465) [org.eclipse.jubula.rc.swing_4.0.0.201602030740.jar:na]
at org.eclipse.jubula.rc.swing.components.AUTSwingHierarchy.componentAdded(AUTSwingHierarchy.java:414) [org.eclipse.jubula.rc.swing_4.0.0.201602030740.jar:na]
at java.awt.Container.processContainerEvent(Container.java:2262) [na:1.8.0_65]
at java.awt.Container.processEvent(Container.java:2233) [na:1.8.0_65]
at java.awt.Component.dispatchEventImpl(Component.java:4891) [na:1.8.0_65]
at java.awt.Container.dispatchEventImpl(Container.java:2294) [na:1.8.0_65]
at java.awt.Component.dispatchEvent(Component.java:4713) [na:1.8.0_65]
at java.awt.Container.addImpl(Container.java:1138) [na:1.8.0_65]
at java.awt.Container.add(Container.java:417) [na:1.8.0_65]
at com.xenos.framework.gui.dock.plaf.BasicDockingPortUI.showDockable(BasicDockingPortUI.java:450) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.dock.plaf.BasicDockingPortUI.propertyChange(BasicDockingPortUI.java:165) [Xenos-framework-gui.jar:16.0.BETA.01.]
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335) [na:1.8.0_65]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327) [na:1.8.0_65]
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263) [na:1.8.0_65]
at java.awt.Component.firePropertyChange(Component.java:8430) [na:1.8.0_65]
at com.xenos.framework.gui.dock.JDockingPort.setSelectedDockable(JDockingPort.java:120) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.dock.JDockPane.activateDockable(JDockPane.java:231) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.dock.JDockPane.activateDockable(JDockPane.java:239) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.dock.JDockPane.activateDockable(JDockPane.java:239) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.dock.JDockPane.setActiveDockable(JDockPane.java:75) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.DockingManager.setSelected(DockingManager.java:208) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.environment.EnvironmentManager$InitEnvironmentThread.doTask(EnvironmentManager.java:1784) [Xenos-framework-gui.jar:16.0.BETA.01.]
at com.xenos.framework.gui.dialog.ProgressThread.run(ProgressThread.java:39) [Xenos-framework-gui.jar:16.0.BETA.01.]

I checked with our developers and as far as they are concerned we only use the Java swing components so there should be nothing that would run outside the Dispatch thread.

I also noticed that I get a ClassCastException when I attempt to store the JMenuItem property (which appears on Object Mapping) like text or label. Not sure if this is related but that is what got me started researching into the log files to find out why I cannot capture the property.

Here is the basic information:
Jubula standalone versions 8.2.0.021 and 8.2.2.50
AUT is a java app that uses the swing toolkit. I used a modified batch file to start the AUT from Jubula.
JVM - Java 1.7.0.45 64 bit
OS - Windows 7 64 bit

Please let me know if you need more information.

Thank-you!

Lynette H.
Re: Error seen everytime I start AUT from Jubula [message #1724650 is a reply to message #1724604] Thu, 25 February 2016 04:31 Go to previous messageGo to next message
Eclipse UserFriend
Hi Lynette,

Thanks for the information!

Can you identify what action via Jubula leads to the log entry? I'll also get the team to take a look at it.

For your other question - menu bars are often mappable in swing applications, but they do not (or rather should not) be mapped. Instead, the actions on menu bars (select, check) etc work with a "default mapping" (i.e. not mapping from your side is required). You can select and check menu paths (e.g. File/Open/Project) using the actions in the unbound modules for menus.

Let us know if you need any more help!
Best regards,
Alex
Re: Error seen everytime I start AUT from Jubula [message #1724651 is a reply to message #1724650] Thu, 25 February 2016 04:32 Go to previous messageGo to next message
Eclipse UserFriend
Apologies, I just read that it comes from the AUT start! I'll check with our side what they say about this.
Re: Error seen everytime I start AUT from Jubula [message #1724746 is a reply to message #1724650] Thu, 25 February 2016 11:48 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

Thanks for the update. I will wait for your team's response regarding the Dispatch Thread error.

With regards to testing the JMenu items (and toolbars), how would one go about testing whether a particular top level menu item exists? I have a test case where certain a toolbar item, say ABC, is removed from version B but still exists in version A.

In my test case I use the following 3 methods to verify existence (and state) of a particular toolbar item (data fed through a Central Data set)
1) ub_mbr_checkExistenceOfEntry_byTextpath,
2) ub_mbr_checkExistenceOfEntry_byIndexpath and
3) ub_mbr_checkEnablementOfEntry_byTextpath (to verify state)

Each of these methods are called sequentially from a Generic menu Test case for each item in the Central Data Set.

The problem I have now is if toolbar item ABC is missing then (1) will fail, but test scripts (2) and (3) still executes although I have added an Event Handler to RETURN when (1) fails. I seem to recall from reading other posts that the Event Handler behaves oddly when using it in combination with Central Data Sets - please confirm if this is still the case.

I added an additional verification in (2) hoping it would stop execution of (2) and perhaps (3) all together when the newly added verification fails. The verification I added is ub_grc_checkProperty - it looks for the property label or text from the mapped menu item/toolbar to make sure it is the expected one.
So far this has failed - I get a ClassCasteException error when I execute this test script.

Am I missing something in my logic? if so can you guide me in what I might try to achieve my objective?

Should this be started as a different thread?

Thanks!

Lynette

Re: Error seen everytime I start AUT from Jubula [message #1725025 is a reply to message #1724746] Mon, 29 February 2016 03:02 Go to previous messageGo to next message
Eclipse UserFriend
Hello Lynette,

If you are using central test data sets, then all sets will be executed. That means that you might not be able to use a central data set like this for a generic check where one time you need the sub path and the next time you don't.

Either that or I haven't quite understood the problem. Can you specify with some examples what you are trying to achieve?

Thanks!
Alex
Re: Error seen everytime I start AUT from Jubula [message #1725087 is a reply to message #1725025] Mon, 29 February 2016 10:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

So there isn't a way that one can check/verify the Index value of a menu item besides using the methods provided by unbound modules, i.e. checkExistenceOfEntry, checkSelection or checkEnablement, when I am using them within the Central Data set? I would have to think about how to move this into its own test case then.

What about the fact that the property of any of these menu items are not found, ie I get a Configuration error when I attempt to use the unbound module/method checkProperty or storeProperty? Shouldn't this be able to help verify whether or not a menu item exists by index value before clicking on it?

Any word from your side regarding the Dispatch thread error in the original post?

Thanks!

Lynette

Re: Error seen everytime I start AUT from Jubula [message #1725133 is a reply to message #1725087] Tue, 01 March 2016 02:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi Lynette,

That the properties can't be checked is not very well handled, but it is actually not supported currently for menu bars. It's never come up before Smile

To verify whether something exists before clicking on it, I'd probably build a generic module that looked like this:

- "Checked select from menu" [TEXTPATH]
-- ubm: check existence of entry by textpath [=TEXTPATH]
-- ubm select entry by textpath [=TEXTPATH]

The =TEXTPATH means that the parameter is referenced, so the whole module can be reused with different textpaths.

However, from a test automation perspective, it's worth considering what the information about existence is worth: the select action will fail with an action error if the entry is not there. If there's something you can do when the check fails to ensure that the menu item appears, then it can be worth checking. Otherwise, you may not need the action.

I've prodded the team again about the other error. We moved offices last week, so it may have gone under a pile of boxes Wink

Best regards,
Alex

Re: Error seen everytime I start AUT from Jubula [message #1725203 is a reply to message #1725133] Tue, 01 March 2016 10:41 Go to previous message
Eclipse UserFriend
Hi Lynette,
looking at the bottom of your stacktrace indicates very well that there is another thread in use. Smile My guess is that either this changes the default toolkit thread or your BasicDockingPortUI class.
The "checkDispatchThread" method in the AUTSwingHierarchy executes java.awt.EventQueue.isDispatchThread() and gets "false" as result which causes the exception.

Best regards,
Sebastian
Previous Topic:webapp testing with redirect / collecting technical names
Next Topic:50009: AUT start failed
Goto Forum:
  


Current Time: Tue Jul 08 03:14:49 EDT 2025

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

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

Back to the top