Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » How to wait for an background job to finish?
How to wait for an background job to finish? [message #1410689] Thu, 21 August 2014 11:43 Go to next message
Vipin Sharma is currently offline Vipin SharmaFriend
Messages: 40
Registered: February 2014
Member
Hi,

1. Is there any way, we can wait until one job, running in background, finishes.

2. How to read eclipse console output text and compare it.

Regards,
Vipin
Re: How to wait for an background job to finish? [message #1410798 is a reply to message #1410689] Thu, 21 August 2014 16:34 Go to previous messageGo to next message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
1. Would this be the only job you have running in the background, or might there be others still running after it finishes?

2. You can map the Console display and do Check Text on it just like any other text component.
Re: How to wait for an background job to finish? [message #1411097 is a reply to message #1410798] Fri, 22 August 2014 11:30 Go to previous messageGo to next message
Vipin Sharma is currently offline Vipin SharmaFriend
Messages: 40
Registered: February 2014
Member
Hello David,

1. This is the only job running in background.

2. But in my case console is getting updated very frequently and it's of big size. And one more thing i dont know when console will stop updating.
Re: How to wait for an background job to finish? [message #1411162 is a reply to message #1411097] Fri, 22 August 2014 14:43 Go to previous messageGo to next message
Andrey Platov is currently offline Andrey PlatovFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Vipin,

You can also check RCP Testing Tool - http://www.eclipse.org/rcptt , which do all the background job tracking, async calls and similar stuff automatically.

Thanks,
Andrey
Re: How to wait for an background job to finish? [message #1413248 is a reply to message #1411162] Thu, 28 August 2014 06:39 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Vipin,

it shouldn't matter that the console is large or that you don't know when the job is done - you can write a module (e.g. called "wait for text to appear in console") that:

- checks whether a specific text is in the console view (using regular expressions e.g. .*background job complete.*)
- if the text is not there, then an event handler in the test case (reacting to a check failed error) is activated. The event handler simply waits for a certain amount of time (e.g. 2000ms). The event handler is set to "retry" (and you can specify how often it should retry). Once the event handler has run, it will perform the failed test step again (the check).

In this way, you can synchronize with the console view to check the text. You can, if you want to, clear the console view before starting your background job by clicking the button in it.

An example of a module that does a very similar thing is in the unbound modules - it's called "wait for enabled" (or similar). It waits until a component is enabled. There's also an example of a module like this on the portal [1].

Hope that helps!
Alex

[1] http://testing.bredex.de/wait-for-status-text-to-change.html
Previous Topic:Problem with few steps in jubula
Next Topic:Problem with test execution
Goto Forum:
  


Current Time: Fri Apr 19 04:02:23 GMT 2024

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

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

Back to the top