Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Kill the AUT at the end of the test(Is there a way to kill the AUT at the end of the test?)
Kill the AUT at the end of the test [message #1385689] Tue, 10 June 2014 13:59 Go to next message
Jurjen Hofstra is currently offline Jurjen HofstraFriend
Messages: 42
Registered: March 2013
Member
Hi Peoples,

At the end of the test I have a shutdown action. I use a single click to exit the AUT. Then a question comes up 'Are you sure you want to exit?(Yes/No)'. Here I use a SPACE action to handle the Yes button. But if the Yes button does'nt have the focus this does'nt work.
When I use a single click action to handle the Yes button, the AUT is shut down, but Jubula thinks the test is still busy.

Since there is a restart action you should say that it should also be possible to simply kill the AUT to end the test.

Is there a straight way to end the test? That's actually the question...


If Jubula does not end the test, no execution log is generated and I have to plough through the plain text log file...

Thanks a lot for your answer!

Kind regards,
Jurjen
Re: Kill the AUT at the end of the test [message #1385709 is a reply to message #1385689] Tue, 10 June 2014 15:30 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1339
Registered: July 2009
Senior Member
Hi Jurjen,

We don't have a "shutdown" or "prepare for exit" action at the moment. Whether a click is confirmed in time or not to end an AUT is a racing condition.
Since AUTs get closed once testexec shuts down, then this might not even be necessary.

Alternatively, if you really need to do this, then you might be able to work with a mnemonic for your "yes" (i.e. hitting Y means "yes"). Perhaps that will help with the focus problem.

Best regards,
Alex
Re: Kill the AUT at the end of the test [message #1385894 is a reply to message #1385709] Thu, 12 June 2014 07:04 Go to previous messageGo to next message
Jurjen Hofstra is currently offline Jurjen HofstraFriend
Messages: 42
Registered: March 2013
Member
Hi Alex,

Using a mnemonic may be an option.
But you say 'If you really need to do this,...' you mean there is still a (default) way to have a test ended? Or do you mean using a timeout option?
When the test is finished, how do you shutdown testexec?

Thanks in advance!

Kind regards,
Jurjen
Re: Kill the AUT at the end of the test [message #1385973 is a reply to message #1385894] Thu, 12 June 2014 14:30 Go to previous messageGo to next message
Dominik Gabriel is currently offline Dominik GabrielFriend
Messages: 69
Registered: June 2013
Member
Hi Jurjen,

I think u could try to use the Prepare for Termination Action. If Jubula thinks the test is still busy, then try to make a Synchronize Termination and re-start AUT. Maybe its not the perfect solution but u should have your execution log then.

Best Regards
Dominik
Re: Kill the AUT at the end of the test [message #1386329 is a reply to message #1385973] Mon, 16 June 2014 15:44 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1339
Registered: July 2009
Senior Member
Hi Jurjen,

I have a feeling that Dominik's suggestion won't work: that action is designed to be used only before the shutdown action.
The default way to have a test ended is just to let the test run till the end. If you're running with testexec, the AUT will then be stopped (if it was started aia an AUT configuration).

Hope that helps,
Alex
Re: Kill the AUT at the end of the test [message #1386393 is a reply to message #1386329] Tue, 17 June 2014 10:18 Go to previous messageGo to next message
Jurjen Hofstra is currently offline Jurjen HofstraFriend
Messages: 42
Registered: March 2013
Member
Hi Dominik & Alex,

In a partly test I dropped my last end test action. That worked. I did'nt know that Jubula automatically ends the AUT when finished the test.
Thursday I will know if it also works for the big nightly test.

Both many thanks for the effort!

kind regards,
Jurjen
Re: Kill the AUT at the end of the test [message #1387166 is a reply to message #1385689] Tue, 24 June 2014 14:42 Go to previous messageGo to next message
Plinio Froener is currently offline Plinio FroenerFriend
Messages: 13
Registered: May 2014
Junior Member
Hi Jurjen, i faced this same behavior, my sugestion is:

You should focus on the window and send a TAB (external command) to confirm focus on the YES button, after this, send a SPACE (external command).

Steps
1.Confirm Focus on the YES Button.(TAB, one or more times)
2.Action, Prepare for AUT termination.
3.Wait(1 second).
4.SPACE (External Key Combination).

For me, it's working successfully!!


Regards,

PlĂ­nio
Re: Kill the AUT at the end of the test [message #1392443 is a reply to message #1386329] Wed, 02 July 2014 10:49 Go to previous messageGo to next message
Jurjen Hofstra is currently offline Jurjen HofstraFriend
Messages: 42
Registered: March 2013
Member
Hi peoples,

I had been experimenting with the -timeout argument of the testexec command. But for a week I removed this argument, but still sometimes the test ends due to a timeout. The system acts as if I passed a -timeout argument.
These are the last lines in the cmd log:

Tue Jul 01 05:09:17 CEST 2014 Test Case: ub_app_pressAnyKey_ENTER
Tue Jul 01 05:09:17 CEST 2014 Test Case: ub_app_pressAnyKey
Tue Jul 01 05:09:17 CEST 2014 Test Case: ub_app_pressAnyKey
Tue Jul 01 05:09:17 CEST 2014 Step: press any key
!!Error occurred !!
5006: Timeout occurred.
Tue Jul 01 05:19:17 CEST 2014 AUT: Disconnected.
Tue Jul 01 05:19:17 CEST 2014 AUT Agent: connection closed.
Tue Jul 01 05:19:17 CEST 2014 Exit: Code 1
Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.jubula.client.core.ClientTestImpl$1

what can be the cause of this timeout error?

Thanks in advance!

Jurjen
Re: Kill the AUT at the end of the test [message #1393690 is a reply to message #1392443] Fri, 04 July 2014 05:53 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1339
Registered: July 2009
Senior Member
Hi,

The timeout command in the testexec will not have anything to do with this situation. As I said above, confirmation of actions and losing the connection to the AUT is a racing condition. If the confirmation comes before the AUT disappears - it's all good. If not, then a timeout will occur. If you're set on trying out more, then you could try using the "external key combination" to perform the last keyboard input. The external key combinations are not confirmed.

Best regards,
Alex
Re: Kill the AUT at the end of the test [message #1397069 is a reply to message #1393690] Wed, 09 July 2014 06:43 Go to previous messageGo to next message
Jurjen Hofstra is currently offline Jurjen HofstraFriend
Messages: 42
Registered: March 2013
Member
Hi Alex,

Many thanks for your answer!

The timeout error did'nt happen again the last days. It may have been a combination of circumstances.

Kind regards,
Jurjen
Re: Kill the AUT at the end of the test [message #1397575 is a reply to message #1397069] Wed, 09 July 2014 23:05 Go to previous message
Fernando Gomes is currently offline Fernando GomesFriend
Messages: 11
Registered: July 2014
Junior Member
I have tested extensively this issue, with my application, happens the following.
If you close it using a "external key combination", in linux 1 out of 10 fails (and gives you the timeout error. However in windows, it fails in a proportion of 8 out of 10.
It looks like it really depends on how the OS is timesharing the applications...
Previous Topic:Size of ComboBox
Next Topic:Check If a Gigantic Mult Line Text Matches
Goto Forum:
  


Current Time: Thu May 28 20:31:21 GMT 2015

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

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