Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Native dialog (file chooser)
Native dialog (file chooser) [message #870513] Tue, 08 May 2012 09:51 Go to next message
Stefan Mertins is currently offline Stefan Mertins
Messages: 11
Registered: March 2012
Junior Member
Hello,

I use jubula to test a rcp application and it works fine with almost all of my test cases. But as soon as I have to deal with native dialogs (like file chooser) I have serious problems.
My modled test case works just fine on one system (I started to test on windows 7). Then I moved to another system (ubuntu linux 32bit) and I had to remodel the testcase, after some trial and error it worked. Now I moved again (to ubuntu linux 64bit headless server, the AUT runs on an virtual frame buffer) and I have the same problem again and I dont know what exactly is causing the problem.

My testcase is as follows:
- Open external file chooser
- wait 1 second
- Copy file path to clipboard
- External Key Combination [control + v]
- External Key Combination [enter]
- wait 1 second

The problem occurs, when the step "External Key Combination [control + v]" is executed. The test execution just stops there and wait for ever. Sometimes however it just runs fine and other times it executes the command twice in a row and stops after it.
If I cancel the External dialog manually, the test execution continues, like nothing happend.

I really cant explain the behavior to myself. When the error occured the first time I originally moved the "Copy file path to clipboard" step out of the time frame when the external dialog is opened (switch step 1 and step 3 of my testcase). After that it worked.
I explained this to myself like "Maybe all test steps, not marked as external need some sort of response from the AUT and dont get it while the focus is on the external file chooser". Hence I removed both wait test steps. But until now I had no success.
The test execution runs fine on the first execution, but still stops in the second and third iteration with a different data set.
The error cant be in the AUT, because it works just fine if I execute the control+v and enter step manually.

Anyone have a idea what to change to get it to work?

Stefan
Re: Native dialog (file chooser) [message #870522 is a reply to message #870513] Tue, 08 May 2012 10:17 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1135
Registered: July 2009
Senior Member
Hi,

A couple of possible reasons come to mind:

- Focus behaviour on different systems - bear in mind that the Ctrl+V is performed to the place where focus is at the moment.
- Synchronization - perhaps waiting longer reduces the frequency of problems?
- Are there any differences between the first and second/third data sets?
- Is there anything in the log?
- Environment - we had some problems with e.g. remote desktop and virtual frame buffer in the past, which is why we use a real desktop environment on virtual machines now.

Perhaps one of these suggestions will put you on the right track...

HTH,
Alex
Re: Native dialog (file chooser) [message #870669 is a reply to message #870522] Wed, 09 May 2012 05:48 Go to previous messageGo to next message
Stefan Mertins is currently offline Stefan Mertins
Messages: 11
Registered: March 2012
Junior Member
Quote:

- Focus behaviour on different systems - bear in mind that the Ctrl+V is performed to the place where focus is at the moment.

If I press ctrl+v manually (without clicking anywhere before) it works just fine

Quote:

- Synchronization - perhaps waiting longer reduces the frequency of problems?

Tried this, but now it starts to stop at wait steps from time to time aswell.

Quote:

- Are there any differences between the first and second/third data sets?

The data set holds only paths for files in the file system. And the problem occurs with all of them. But from time to time one or two data sets work.

Quote:

- Is there anything in the log?

If I use testexec no logs are found in $JUBULA_HOME/jubula/configuration/testexec/
after the problem occured. Are there any other logs?
The console log looks as follows:
Wed May 09 11:31:10 CEST 2012 Test Case: Select model to import (External)
Wed May 09 11:31:10 CEST 2012 Step: Copy String to Clipboard
Wed May 09 11:31:10 CEST 2012 Step: Click on Button/Check Box/Radio Button ("Browse")
Wed May 09 11:31:10 CEST 2012 Step: External key combination
Wed May 09 11:37:07 CEST 2012 Step: Press Enter

I pressed in this case ctrl+v manually after a few minutes and like always it continous the execution after it.

Quote:

- Environment - we had some problems with e.g. remote desktop and virtual frame buffer in the past, which is why we use a real desktop environment on virtual machines now.

At the moment I have no problems with the virtual frame buffer, the problem occurs also on other non headless systems.
Re: Native dialog (file chooser) [message #870870 is a reply to message #870669] Thu, 10 May 2012 02:24 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1135
Registered: July 2009
Senior Member
Looking at this, I'm reminded of a forum entry (which I unfortunately can't find right now) where the behaviour of the native dialog made it necessary to perform quite a long wait. When you say that you increased the wait, how long did you increase it to?

If I remember correctly, the person who had the problem I referred to found that his test worked 100% of the time if he used a 10 second wait. I know that this is a lot of time - perhaps your system requires less - but just to be really sure it's not a synchronization problem, then I'd recommend trying a long wait just to see what happens.

Also, is there anything in the log that may help?

Best regards,
Alex
Re: Native dialog (file chooser) [message #871505 is a reply to message #870513] Mon, 14 May 2012 05:40 Go to previous messageGo to next message
Stefan Mertins is currently offline Stefan Mertins
Messages: 11
Registered: March 2012
Junior Member
Hi,

I used wait times between 0,5 and 7 seconds. I will try the 10seconds.
For now I use a workaround and skip the native dialog in my workflow.

Quote:
Also, is there anything in the log that may help?

Today I found this after the external Command while attempting to do the second wait.
2012-05-14 10:46:40.096 [Close Session Factory] ERROR o.e.j.c.core.persistence.Persistor - dispose of Persistor failed
org.eclipse.swt.SWTException: Device is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4282) ~[org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar:na]
	at org.eclipse.swt.SWT.error(SWT.java:4197) ~[org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar:na]
	at org.eclipse.swt.SWT.error(SWT.java:4168) ~[org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar:na]
	at org.eclipse.swt.widgets.Display.error(Display.java:1210) ~[org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar:na]
	at org.eclipse.swt.widgets.Display.asyncExec(Display.java:713) ~[org.eclipse.swt.gtk.linux.x86_3.7.2.v3740f.jar:na]
	at org.eclipse.jubula.app.core.JubulaWorkbenchWindowAdvisor$ApplicationWindowTitleUpdater.updateProjectNameInTitlebar(JubulaWorkbenchWindowAdvisor.java:85) ~[na:na]
	at org.eclipse.jubula.app.core.JubulaWorkbenchWindowAdvisor$ApplicationWindowTitleUpdater.reactOnDatabaseEvent(JubulaWorkbenchWindowAdvisor.java:56) ~[na:na]
	at org.eclipse.jubula.client.core.utils.DatabaseStateDispatcher.notifyListener(DatabaseStateDispatcher.java:67) ~[org.eclipse.jubula.client.core_1.2.0.201203181048.jar:na]
	at org.eclipse.jubula.client.core.persistence.Persistor.dispose(Persistor.java:1168) ~[org.eclipse.jubula.client.core_1.2.0.201203181048.jar:na]
	at org.eclipse.jubula.client.core.persistence.Persistor$1.run(Persistor.java:96) [org.eclipse.jubula.client.core_1.2.0.201203181048.jar:na]


I also curious about the Environment you use. How do you automate testing on different VMs? Are you using Jenkins to do so and are there any Blogs or Howtos about it?
At the moment we use a Server with Jenkins, that builds the RCP, configures a local test environment (copy rcp, copy jubula plugin into rcp, add jubula osgi bundle, ...) and executes the tests afterwards.

Stefan

[Updated on: Mon, 14 May 2012 06:17]

Report message to a moderator

Re: Native dialog (file chooser) [message #871534 is a reply to message #871505] Mon, 14 May 2012 07:05 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1135
Registered: July 2009
Senior Member
Hi,

Our nightly process looks like this:

We use Hudson to check out the sources and trigger the build.
We install the artifacts on the virtual machines
We set up the test environment (clear databases, set configurations and workspaces etc)
Then we execute the tests.

There is a blog about using Jenkins here.

HTH,
Alex



Re: Native dialog (file chooser) [message #1073570 is a reply to message #871534] Thu, 25 July 2013 00:42 Go to previous messageGo to next message
Byron Kooima is currently offline Byron Kooima
Messages: 5
Registered: July 2013
Junior Member
Was a true solution to this problem ever uncovered? I have been trying for weeks to get this to work and it is frustrating me to no end. I am seeing the exact same symptoms as Stefan and it doesn't seem to matter what I do to the order. Sometimes my test waits for 20 seconds to copy something to the clipboard. I can rerun the exact same test and it takes 20 seconds on the Ctrl+V.

I am basically attempting the same steps that Stefan is using on his native dialog. My test is trying to execute on an Eclipse RCP plugin and the native dialog is used to open an XML file for the plugin.

Every time I think I have made some progress, I come back the next time and it hangs on one of the steps in the native dialog list. I would hate to think that I have to enter the entire path using and external input text since that won't accept '/'.

Would appreciate any insight on what could possibly be causing this. There is no error log and it really acts like the dialog box is losing focus, but I have verified 100 times that the cursor is still in the "Location" box and the dialog is in focus.
Re: Native dialog (file chooser) [message #1073751 is a reply to message #1073570] Thu, 25 July 2013 08:27 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1135
Registered: July 2009
Senior Member
Hi Byron,

Not as far as I'm aware, no. You could enter a ticket for your problem, linking to this forum. Please also add what Eclipe and SWT version you are using, and what platform you are on.

Best regards,
Alex
Re: Native dialog (file chooser) [message #1405468 is a reply to message #870513] Thu, 07 August 2014 08:28 Go to previous message
Badr BADDOU is currently offline Badr BADDOU
Messages: 1
Registered: August 2014
Junior Member
Hi Alex,

In case the focus behaviour is not selecting the right place, what is the solution ?


Badr,
Previous Topic:Not allowed to save an unlocked workversion
Next Topic:Periodic Error: "Cannot delete test result"
Goto Forum:
  


Current Time: Mon Sep 01 22:02:34 EDT 2014

Powered by FUDForum. Page generated in 0.01863 seconds