Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » GUI recorder - wait until job completed
GUI recorder - wait until job completed [message #61263] Tue, 28 March 2006 16:32 Go to next message
Eclipse UserFriend
Originally posted by: vladimir.au.ru

- I've tried to use GUI recorder for my test scenario, but I can't find
the way how to wait until particular job completed. For instance, during
long-run operation
" org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og " appears
and I need to wait while when the job completed and dialog closed. I've
tried to use <command type="wait"/> but test failed with the following
exception:
A time-out occurred while waiting for the nested shell
org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og to
complete. It is likely caused by the absence of the shell.

- I want to execute my test cases in the loop and measure time of
execution for every (or particular) step. Is it possible with TPTP?

Thanks in advance,
Vladimir.
Re: GUI recorder - wait until job completed [message #61378 is a reply to message #61263] Tue, 28 March 2006 16:57 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Vladimir,

There is a time-out threshold under the behavior page that you can adjust.
The default time-out period is 30 seconds.
You can also define wait commands based on a wait period.
e.g. <command type="wait" time-to-wait="5000"/> will cause a 5 second delay.
Alternatively, <command type="wait"/> will cause a wait until all user
Eclipse jobs are complete.

> - I want to execute my test cases in the loop and measure time of
> execution for every (or particular) step. Is it possible with TPTP?
You can't do profiling with AGR but if you look at the execution history
file, a start and stop event is reported for each invocation. That's the
only time-stamp information that is reported.


"Vladimir" <vladimir@au.ru> wrote in message
news:995ad7af3aa6fb2718cee2397aeda17e$1@www.eclipse.org...
> - I've tried to use GUI recorder for my test scenario, but I can't find
> the way how to wait until particular job completed. For instance, during
> long-run operation
> " org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og " appears
> and I need to wait while when the job completed and dialog closed. I've
> tried to use <command type="wait"/> but test failed with the following
> exception:
> A time-out occurred while waiting for the nested shell
> org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og to
> complete. It is likely caused by the absence of the shell.
>
> - I want to execute my test cases in the loop and measure time of
> execution for every (or particular) step. Is it possible with TPTP?
>
> Thanks in advance,
> Vladimir.
>
Re: GUI recorder - wait until job completed [message #61429 is a reply to message #61378] Tue, 28 March 2006 17:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladimir.au.ru

Ali, thanks for the answer.

Ali Mehregani wrote:

> Vladimir,

> There is a time-out threshold under the behavior page that you can adjust.
> The default time-out period is 30 seconds.
> You can also define wait commands based on a wait period.
> e.g. <command type="wait" time-to-wait="5000"/> will cause a 5 second delay.
> Alternatively, <command type="wait"/> will cause a wait until all user
> Eclipse jobs are complete.

I've tried again, and TPTP not waited until job completed. I use TPTP
version 4.1.0 with eclipse 3.1.2.
Here is parts from my test script (I try to import data from CVS to
existing project):
<macro version="0.1" >
<shell id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
<command type="focus"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Composite#1"/>
<command type="select"
contextId=" popup/view/org.eclipse.jdt.ui.PackageExplorer/org.eclipse.sw t.widgets.Tree#{{/}}-{{1.0}} "
widgetId="contribid/import13"/>
<shell id="org.eclipse.jface.wizard.WizardDialog" return-code="0">
<command type="item-select"
contextId="wizard-page/singleWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Table#1">
<item
path=" org.eclipse.swt.widgets.TableItem#{{org.eclipse.team.cvs.ui. newProjectCheckout}}-{{1.0}} "/>
</command>
<command type="focus"
contextId="wizard-page/singleWizardSelectionPage"
widgetId="org.eclipse.swt.widgets.Table#1"/>
<command type="select" contextId="wizard"
widgetId="org.eclipse.swt.widgets.Button#{{15}}-{{1.0}}"/>
<!--......... -->
<!--set all checkout option and finally press Finish button -->
<!--.........now press Finish -->
<command type="select" contextId="wizard"
widgetId="org.eclipse.swt.widgets.Button#{{16}}-{{1.0}}"/>
<command type="wait"/>
</shell>
<!-- additional wait -->
<command type="wait"/>
</shell>
</macro>

I insert additional wait in the end of script but it doesnt help. Is it a
known limitation?

>> - I want to execute my test cases in the loop and measure time of
>> execution for every (or particular) step. Is it possible with TPTP?
> You can't do profiling with AGR but if you look at the execution history
> file, a start and stop event is reported for each invocation. That's the
> only time-stamp information that is reported.

Thanks, I've seen it. I just think that there is another way for it.

Thanks,
Vladimir


> "Vladimir" <vladimir@au.ru> wrote in message
> news:995ad7af3aa6fb2718cee2397aeda17e$1@www.eclipse.org...
>> - I've tried to use GUI recorder for my test scenario, but I can't find
>> the way how to wait until particular job completed. For instance, during
>> long-run operation
>> " org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og " appears
>> and I need to wait while when the job completed and dialog closed. I've
>> tried to use <command type="wait"/> but test failed with the following
>> exception:
>> A time-out occurred while waiting for the nested shell
>> org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og to
>> complete. It is likely caused by the absence of the shell.
>>
>> - I want to execute my test cases in the loop and measure time of
>> execution for every (or particular) step. Is it possible with TPTP?
>>
>> Thanks in advance,
>> Vladimir.
>>
Re: GUI recorder - wait until job completed [message #61477 is a reply to message #61378] Tue, 28 March 2006 18:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Dmitry.M.Kononov.gmail.com

Hi Ali,

I have run into the same problem. Looks like it doesn't matter if the
"Synchronous" checkbox under the Behavior tab is checked or not. It seems
the test cases execute in an asynchronous manner always.

Ali Mehregani wrote:
> Alternatively, <command type="wait"/> will cause a wait until all user
> Eclipse jobs are complete.

Could you please explain what does "all user Eclipse jobs" mean in detail?
Please look at the following test suite.

1) Import a Java project. The project should be really big.
2) Clean project.
3) Build project.
4) Remove project from the Eclipse.

All these test cases invocations marked as synchronous under the Behavior
tab.

What we have in practice?

If the first test case takes long time, since a project is importing from
CVS or an archive, we get something like this:

1) running
2) waiting
3) waiting
4) waiting

If the first test case imports a project into the workspace as an existing
one we get jobs in a progress view as follows:
1) done
2) running
3) waiting
4) waiting

These jobs look overlapping. So, what is the sense of the "Synchronous"
checkbox under the Behavior tab?

There is another issue.
An AGR test suite launcher does not wait all the test cases finish. It
closes a tested workbench without regard to whether some test cases are
still running/waiting.

It looks like the launcher has only one goal: to launch all the test cases
and close a test workbench immediately.

Could you please explain me what do I do incorrectly?

Thanks.
--
Dmitry
Re: GUI recorder - wait until job completed [message #62271 is a reply to message #61477] Wed, 29 March 2006 17:13 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Hi Dmitry,

The "Synchronous" option doesn't have any semantics with AGR test suites.
The option was taken out in 4.2.
"User eclipse jobs" are jobs that are registered with Eclipse's job manager.

Can you use time-dependent wait commands in your test suite (e.g. <command
type="wait" time-to-wait="10000"/> causes a 10 second wait). If you are
specifying wait commands that are longer than 30 seconds, then ensure to
increase the time-out threshold for each command OR alternatively you can do
multiple wait commands. For example:
<command type="wait" time-to-wait="25000"/>
<command type="wait" time-to-wait="25000"/>

causes a 50 second wait.

You'll have to manually insert the wait command after the project is
imported. You can adjust the time-to-wait value to wait a sufficient amount
of time before continuing with another test case.

One thing to keep in mind is that the time-out threshold value specified
under the behavior page is only applicable to standard launches. It will
not work in quick mode.


"Dmitry" <Dmitry.M.Kononov@gmail.com> wrote in message
news:fe431702c965de1bb196dca725395344$1@www.eclipse.org...
>
> Hi Ali,
>
> I have run into the same problem. Looks like it doesn't matter if the
> "Synchronous" checkbox under the Behavior tab is checked or not. It seems
> the test cases execute in an asynchronous manner always.
>
> Ali Mehregani wrote:
> > Alternatively, <command type="wait"/> will cause a wait until all user
> > Eclipse jobs are complete.
>
> Could you please explain what does "all user Eclipse jobs" mean in detail?
> Please look at the following test suite.
>
> 1) Import a Java project. The project should be really big.
> 2) Clean project.
> 3) Build project.
> 4) Remove project from the Eclipse.
>
> All these test cases invocations marked as synchronous under the Behavior
> tab.
>
> What we have in practice?
>
> If the first test case takes long time, since a project is importing from
> CVS or an archive, we get something like this:
>
> 1) running
> 2) waiting
> 3) waiting
> 4) waiting
>
> If the first test case imports a project into the workspace as an existing
> one we get jobs in a progress view as follows:
> 1) done
> 2) running
> 3) waiting
> 4) waiting
>
> These jobs look overlapping. So, what is the sense of the "Synchronous"
> checkbox under the Behavior tab?
>
> There is another issue.
> An AGR test suite launcher does not wait all the test cases finish. It
> closes a tested workbench without regard to whether some test cases are
> still running/waiting.
>
> It looks like the launcher has only one goal: to launch all the test cases
> and close a test workbench immediately.
>
> Could you please explain me what do I do incorrectly?
>
> Thanks.
> --
> Dmitry
>
Re: GUI recorder - wait until job completed [message #62295 is a reply to message #61429] Wed, 29 March 2006 17:16 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Did you use <command type="wait"/> or <command type="wait"
time-to-wait="..."/>?

If you used <command type="wait"/>, then keep in mind that the time-out
threshold set under the behavior page will only apply in a standard launch
(not quick mode).
If you used a time-dependent wait command, then simply try to increase the
time-to-wait value.


"Vladimir" <vladimir@au.ru> wrote in message
news:a2fd08c833cb23b37ad2da29c6dd9faf$1@www.eclipse.org...
> Ali, thanks for the answer.
>
> Ali Mehregani wrote:
>
> > Vladimir,
>
> > There is a time-out threshold under the behavior page that you can
adjust.
> > The default time-out period is 30 seconds.
> > You can also define wait commands based on a wait period.
> > e.g. <command type="wait" time-to-wait="5000"/> will cause a 5 second
delay.
> > Alternatively, <command type="wait"/> will cause a wait until all user
> > Eclipse jobs are complete.
>
> I've tried again, and TPTP not waited until job completed. I use TPTP
> version 4.1.0 with eclipse 3.1.2.
> Here is parts from my test script (I try to import data from CVS to
> existing project):
> <macro version="0.1" >
> <shell id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
> <command type="focus"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Composite#1"/>
> <command type="select"
>
contextId=" popup/view/org.eclipse.jdt.ui.PackageExplorer/org.eclipse.sw t.wid
gets.Tree#{{/}}-{{1.0}}"
> widgetId="contribid/import13"/>
> <shell id="org.eclipse.jface.wizard.WizardDialog" return-code="0">
> <command type="item-select"
> contextId="wizard-page/singleWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Table#1">
> <item
>
path=" org.eclipse.swt.widgets.TableItem#{{org.eclipse.team.cvs.ui. newProject
Checkout}}-{{1.0}}"/>
> </command>
> <command type="focus"
> contextId="wizard-page/singleWizardSelectionPage"
> widgetId="org.eclipse.swt.widgets.Table#1"/>
> <command type="select" contextId="wizard"
> widgetId="org.eclipse.swt.widgets.Button#{{15}}-{{1.0}}"/>
> <!--......... -->
> <!--set all checkout option and finally press Finish button -->
> <!--.........now press Finish -->
> <command type="select" contextId="wizard"
> widgetId="org.eclipse.swt.widgets.Button#{{16}}-{{1.0}}"/>
> <command type="wait"/>
> </shell>
> <!-- additional wait -->
> <command type="wait"/>
> </shell>
> </macro>
>
> I insert additional wait in the end of script but it doesnt help. Is it a
> known limitation?
>
> >> - I want to execute my test cases in the loop and measure time of
> >> execution for every (or particular) step. Is it possible with TPTP?
> > You can't do profiling with AGR but if you look at the execution history
> > file, a start and stop event is reported for each invocation. That's
the
> > only time-stamp information that is reported.
>
> Thanks, I've seen it. I just think that there is another way for it.
>
> Thanks,
> Vladimir
>
>
> > "Vladimir" <vladimir@au.ru> wrote in message
> > news:995ad7af3aa6fb2718cee2397aeda17e$1@www.eclipse.org...
> >> - I've tried to use GUI recorder for my test scenario, but I can't find
> >> the way how to wait until particular job completed. For instance,
during
> >> long-run operation
> >> " org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og "
appears
> >> and I need to wait while when the job completed and dialog closed. I've
> >> tried to use <command type="wait"/> but test failed with the following
> >> exception:
> >> A time-out occurred while waiting for the nested shell
> >> org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og to
> >> complete. It is likely caused by the absence of the shell.
> >>
> >> - I want to execute my test cases in the loop and measure time of
> >> execution for every (or particular) step. Is it possible with TPTP?
> >>
> >> Thanks in advance,
> >> Vladimir.
> >>
>
>
Re: GUI recorder - wait until job completed [message #62653 is a reply to message #62295] Thu, 30 March 2006 14:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladimir.au.ru

Ali, thanks for the answer

Ali Mehregani wrote:

> Did you use <command type="wait"/> or <command type="wait"
> time-to-wait="..."/>?

At the moment I use the following workaround: loop of wait commands.

> If you used <command type="wait"/>, then keep in mind that the time-out
> threshold set under the behavior page will only apply in a standard launch
> (not quick mode).
> If you used a time-dependent wait command, then simply try to increase the
> time-to-wait value.

But why wait command do not works properly? Am I correctly understand that
wait command should wait until all eclipse job completed, i.e. while cvs
chechout will completed.

Thanks,
Vladimir.
Re: GUI recorder - wait until job completed [message #65582 is a reply to message #62653] Tue, 11 April 2006 15:25 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
Yes, wait commands should wait until the CVS job completes, but wait command
(just like any other commands) will time-out if the time-out threshold is
reached.





"Vladimir" <vladimir@au.ru> wrote in message
news:79b603a6822fb0ecb27762353e221344$1@www.eclipse.org...
> Ali, thanks for the answer
>
> Ali Mehregani wrote:
>
> > Did you use <command type="wait"/> or <command type="wait"
> > time-to-wait="..."/>?
>
> At the moment I use the following workaround: loop of wait commands.
>
> > If you used <command type="wait"/>, then keep in mind that the time-out
> > threshold set under the behavior page will only apply in a standard
launch
> > (not quick mode).
> > If you used a time-dependent wait command, then simply try to increase
the
> > time-to-wait value.
>
> But why wait command do not works properly? Am I correctly understand that
> wait command should wait until all eclipse job completed, i.e. while cvs
> chechout will completed.
>
> Thanks,
> Vladimir.
>
>
>
>
Re: GUI recorder - wait until job completed [message #66117 is a reply to message #65582] Wed, 12 April 2006 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladimir.au.ru

Ali Mehregani wrote:

> Yes, wait commands should wait until the CVS job completes, but wait command
> (just like any other commands) will time-out if the time-out threshold is
> reached.


Hi Ali,

Unfortunately wait is not working for me. I used eclipse 3.1.2 with TPTP
4.1.0. For my particular step (import from cvs) I set timeout threshold
for each command to 90000 seconds. It should be enough for cvs checkout,
but after several seconds of checkout script continue execution of the
next steps. What do you think about it?

Here is parts from my macro script:
<macro version="0.1" >
<shell id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
<command type="focus"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Composite#1"/>
<command type="select"
contextId=" popup/view/org.eclipse.jdt.ui.PackageExplorer/org.eclipse.sw t.widgets.Tree#{{/}}-{{1.0}} "
widgetId="contribid/import13"/>
<shell id="org.eclipse.jface.wizard.WizardDialog" return-code="0">
<!--
Here I set options in CVS Checkout wizard and press finish button in the
wizard
-->
<command type="wait"/>
</shell>
<!--I suggest this command should wait until checkout completed -->
<command type="wait"/>
</shell>
</macro>


Thanks,
Vladimir.


> "Vladimir" <vladimir@au.ru> wrote in message
> news:79b603a6822fb0ecb27762353e221344$1@www.eclipse.org...
>> Ali, thanks for the answer
>>
>> Ali Mehregani wrote:
>>
>> > Did you use <command type="wait"/> or <command type="wait"
>> > time-to-wait="..."/>?
>>
>> At the moment I use the following workaround: loop of wait commands.
>>
>> > If you used <command type="wait"/>, then keep in mind that the time-out
>> > threshold set under the behavior page will only apply in a standard
> launch
>> > (not quick mode).
>> > If you used a time-dependent wait command, then simply try to increase
> the
>> > time-to-wait value.
>>
>> But why wait command do not works properly? Am I correctly understand that
>> wait command should wait until all eclipse job completed, i.e. while cvs
>> chechout will completed.
>>
>> Thanks,
>> Vladimir.
>>
>>
>>
>>
Re: GUI recorder - wait until job completed [message #66389 is a reply to message #66117] Thu, 13 April 2006 19:12 Go to previous message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
It can be because the CVS job is not being registered as a type of job that
the wait command looks for. You can open a defect if you like me to look
into the problem in more details.


"Vladimir" <vladimir@au.ru> wrote in message
news:25b4790a00355eb481f58bc1d1a5856d$1@www.eclipse.org...
> Ali Mehregani wrote:
>
> > Yes, wait commands should wait until the CVS job completes, but wait
command
> > (just like any other commands) will time-out if the time-out threshold
is
> > reached.
>
>
> Hi Ali,
>
> Unfortunately wait is not working for me. I used eclipse 3.1.2 with TPTP
> 4.1.0. For my particular step (import from cvs) I set timeout threshold
> for each command to 90000 seconds. It should be enough for cvs checkout,
> but after several seconds of checkout script continue execution of the
> next steps. What do you think about it?
>
> Here is parts from my macro script:
> <macro version="0.1" >
> <shell id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
> <command type="focus"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Composite#1"/>
> <command type="select"
>
contextId=" popup/view/org.eclipse.jdt.ui.PackageExplorer/org.eclipse.sw t.wid
gets.Tree#{{/}}-{{1.0}}"
> widgetId="contribid/import13"/>
> <shell id="org.eclipse.jface.wizard.WizardDialog" return-code="0">
> <!--
> Here I set options in CVS Checkout wizard and press finish button in the
> wizard
> -->
> <command type="wait"/>
> </shell>
> <!--I suggest this command should wait until checkout completed -->
> <command type="wait"/>
> </shell>
> </macro>
>
>
> Thanks,
> Vladimir.
>
>
> > "Vladimir" <vladimir@au.ru> wrote in message
> > news:79b603a6822fb0ecb27762353e221344$1@www.eclipse.org...
> >> Ali, thanks for the answer
> >>
> >> Ali Mehregani wrote:
> >>
> >> > Did you use <command type="wait"/> or <command type="wait"
> >> > time-to-wait="..."/>?
> >>
> >> At the moment I use the following workaround: loop of wait commands.
> >>
> >> > If you used <command type="wait"/>, then keep in mind that the
time-out
> >> > threshold set under the behavior page will only apply in a standard
> > launch
> >> > (not quick mode).
> >> > If you used a time-dependent wait command, then simply try to
increase
> > the
> >> > time-to-wait value.
> >>
> >> But why wait command do not works properly? Am I correctly understand
that
> >> wait command should wait until all eclipse job completed, i.e. while
cvs
> >> chechout will completed.
> >>
> >> Thanks,
> >> Vladimir.
> >>
> >>
> >>
> >>
>
>
Previous Topic:InactiveProcessException when starting TPTP JUnit Plugin
Next Topic:AGR inside a runtime workspace
Goto Forum:
  


Current Time: Mon Dec 22 12:11:21 GMT 2014

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

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