Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » How to ensure the correct application is tested
How to ensure the correct application is tested [message #722306] Mon, 05 September 2011 06:20 Go to next message
Sebastian Hegewald is currently offline Sebastian Hegewald
Messages: 6
Registered: September 2011
Junior Member
We want to test our rcp application through jubula.
One question that still exists is, how to ensure that the correct application will be tested?

We start our test in an virtual Windows 7 by a call of the testexecutor through a Jenkins job. This work so far.

Just one problem. If inside of the virtual machine a window is open and in foreground (e.g. an Windows Explorer) then the testexecutor tests this window.
Also a restart of our application through the testexecutor brings no success.

Is there a solution to test which application is in foreground and to change to our desired application?

Thanks
Sebastian


Re: How to ensure the correct application is tested [message #722312 is a reply to message #722306] Mon, 05 September 2011 06:55 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1055
Registered: July 2009
Senior Member
Hi,

I'd recommend taking a look at this blog entry, specifically the part about switching AUTs:
http://www.bredex.de/web/index.php/blog_article_de/items/using-jubula-to-test-multiple-applications.html

Best regards,
Alex

[Updated on: Wed, 01 February 2012 01:57]

Report message to a moderator

Re: How to ensure the correct application is tested [message #722320 is a reply to message #722312] Mon, 05 September 2011 07:25 Go to previous messageGo to next message
Sebastian Hegewald is currently offline Sebastian Hegewald
Messages: 6
Registered: September 2011
Junior Member
Alex Schladebeck wrote on Mon, 05 September 2011 06:55
Hi,

I'd recommend taking a look at this blog entry, specifically the part about switching AUTs:
...

Best regards,
Alex


Yes, i just read it before and used it. But the problem is that under Windows 7 the last entry in the application list is always the desktop. Thus i always switch between the windows desktop and the primarily open window (e.g. Windows Exlporer).

Thanks
Sebastian

Re: How to ensure the correct application is tested [message #722336 is a reply to message #722320] Mon, 05 September 2011 08:13 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1055
Registered: July 2009
Senior Member
Hi,

On my Windows 7 system, Alt+Shift+Tab takes me through all open windows in order, without ever going to the desktop. The only thing I can think of in this case is that it is configurable for the system.

Does that help at all?

Alex
Re: How to ensure the correct application is tested [message #722924 is a reply to message #722336] Wed, 07 September 2011 04:23 Go to previous messageGo to next message
Sebastian Hegewald is currently offline Sebastian Hegewald
Messages: 6
Registered: September 2011
Junior Member
Alex Schladebeck wrote on Mon, 05 September 2011 08:13
Hi,

On my Windows 7 system, Alt+Shift+Tab takes me through all open windows in order, without ever going to the desktop. The only thing I can think of in this case is that it is configurable for the system.

Does that help at all?

Alex


Hi,

it just works after setting the ALT+TAB behaviour of Windows 7 to the old style Windows XP behaviour.

I just need to add a new key in the registry:

Location:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer

And added the following REG_DWORD value:

AltTabSettings=1
Re: How to ensure the correct application is tested [message #723352 is a reply to message #722924] Thu, 08 September 2011 07:59 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1055
Registered: July 2009
Senior Member
Hi,

Pleased it works now, and thanks for posting the solution!

Cheers,
Alex
Re: How to ensure the correct application is tested [message #756244 is a reply to message #722306] Fri, 11 November 2011 11:23 Go to previous messageGo to next message
Phil M. Fischer is currently offline Phil M. Fischer
Messages: 60
Registered: November 2010
Location: Germany
Member
HI there,

Initially it sounded like an easy way to use the ALT+SHIFT+TAB. But unfortunately i just got the ALT+TAB working... for ALT+SHIFT+TAB i have not found a way of creatinga test case... Changing the registry is not an option... is there any other way...

Cheers

Phil
Re: How to ensure the correct application is tested [message #756286 is a reply to message #756244] Fri, 11 November 2011 14:22 Go to previous message
Phil M. Fischer is currently offline Phil M. Fischer
Messages: 60
Registered: November 2010
Location: Germany
Member
Hello again,

finally after some try-and-error i've found a way that works fine for me. Actually I am using the beforemetioned approach of trying to activate the application by clicking its titlebar. In case it fails an event handler is issuing an ALT+SHIFT+TAB to cycle through the windows. Since there is no test-case for ALT+SHIFT+{key} i created a little .EXE sending out such a key combination. My event handler is calling this .EXE. Alltogether it works fine... I create the .EXE using Visual Basic but should be easy with other languages as well:

 Sub Main()
        My.Computer.Keyboard.SendKeys("%+{TAB}", True)
        REM Dim path As String = Directory.GetCurrentDirectory()
        REM MsgBox(path)
 End Sub


The two lines commented out can be used to get information of the current working directory. This was helpful to execute the .EXE using a relative path.

Still it's a hack and i would prefer having a test case that can handle ALT+SHIFT+{key}.

Hope this helps...

Phil
Previous Topic:External command exit code is not picked up by Jubula
Next Topic:How to select a menu item after right click?
Goto Forum:
  


Current Time: Fri Apr 18 21:53:54 EDT 2014

Powered by FUDForum. Page generated in 0.05887 seconds