Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » AGR: Waiting for process
AGR: Waiting for process [message #137100] Wed, 15 October 2008 19:57 Go to next message
Mark Bretl is currently offline Mark BretlFriend
Messages: 4
Registered: July 2009
Junior Member
I am using Eclipse 3.3.2 with TPTP 4.4.1 and using the Automated GUI
Recorder to execute some test launches. During the recording process, I
need to wait for a process to finish before I go on to the next step. I
have used the wait command (<command type="wait"/>) and it does not seem
to wait for the process I want. The wait command does work well when
during the first part of the launch where I have the building steps in a
separate ProgressMonitorDialog, here is an example:

<shell descriptive="Build for launch"
id=" org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og "
return-code="0">
<command type="wait"/>
</shell>

But for the actual launch execution I using a proprietary TestRunner,
which logs into the console and a process in the Progress View. Using AGR
I am able to get focus on the Progress View, but I dont know how to make
it wait for all the process to be done within the Progress View. Here is
an example of Progress View focus:

<command type="focus" contextId="view/org.eclipse.ui.views.ProgressView"
widgetId="org.eclipse.swt.widgets.Composite#1"/>

I tried to change 'focus' to 'wait', but that did not work. Besides the
'time-to-wait' argument, what other types of arguments does the wait
command take? Would it be possible to get Progress View to get into a
different shell so I can isolate the process threads?

Thanks,

Mark
Re: Waiting for process [message #137136 is a reply to message #137100] Thu, 16 October 2008 10:48 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Mark,
With the AGR, there is little support for controlling the timing of a
test execution. In fact, the 'wait' command is the only way to do this but
there are limitations (see
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-5-0.html#2.5):

-only the current thread is suspended

-there is only one argument ('time-to-wait')

-without the 'time-to-wait' argument, test execution is suspended until the
current Eclipse jobs are completed, which may be include the task you want
to wait for

-with the 'time-to-wait' argument, test execution is suspended for the fixed
amount of time specified, which may slow test execution to ensure sufficient
time is specified to cover the entire task

Unfortunately, there is no way to get the Progress View into a different
shell.

Paul
"Mark Bretl" <markb@ambric.com> wrote in message
news:b8efb58ca4d95d8245c0d092ffc4ef3c$1@www.eclipse.org...
>I am using Eclipse 3.3.2 with TPTP 4.4.1 and using the Automated GUI
>Recorder to execute some test launches. During the recording process, I
>need to wait for a process to finish before I go on to the next step. I
>have used the wait command (<command type="wait"/>) and it does not seem to
>wait for the process I want. The wait command does work well when during
>the first part of the launch where I have the building steps in a separate
>ProgressMonitorDialog, here is an example:
>
> <shell descriptive="Build for launch"
> id=" org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og "
> return-code="0">
> <command type="wait"/>
> </shell>
>
> But for the actual launch execution I using a proprietary TestRunner,
> which logs into the console and a process in the Progress View. Using AGR
> I am able to get focus on the Progress View, but I dont know how to make
> it wait for all the process to be done within the Progress View. Here is
> an example of Progress View focus:
>
> <command type="focus" contextId="view/org.eclipse.ui.views.ProgressView"
> widgetId="org.eclipse.swt.widgets.Composite#1"/>
> I tried to change 'focus' to 'wait', but that did not work. Besides the
> 'time-to-wait' argument, what other types of arguments does the wait
> command take? Would it be possible to get Progress View to get into a
> different shell so I can isolate the process threads?
>
> Thanks,
>
> Mark
>
Re: Waiting for process [message #137292 is a reply to message #137136] Wed, 22 October 2008 17:11 Go to previous messageGo to next message
Mark Bretl is currently offline Mark BretlFriend
Messages: 4
Registered: July 2009
Junior Member
With some investigative work, I found out that the wait was only waiting
for non-System Eclipse jobs. This caused me issues since once a launch
has been executed, the job is removed from the JobManager. I needed to
find out how to change the wait to look launches too and I have been able
to modify the wait command to wait for a launch to finish.

What I was able to do:

Assume: Only one launch at a time and always wait until launch is finished

What I changed:
Modified the wait command for when the "time-to-wait"= 1, poll the
ILaunchManager for any launches, wait for the launch to be terminated,
then return from the wait command

I figured that the value of 1 was safe for me to use since there is not
much use for waiting 1ms. It is somewhat of a hack with a few
assumptions, but it works and now my tests function correctly. When I
have more time, I hope to extend the wait command to accept a new
attribute so that I do not rely on a 'key value' from the "time-to-wait"
attribute.

Hope that might be able to help others in thinking about their own waiting
issues.

Mark

Paul Slauenwhite wrote:

> Hi Mark,
> With the AGR, there is little support for controlling the timing of a
> test execution. In fact, the 'wait' command is the only way to do this but
> there are limitations (see
>
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-5-0.html#2.5):

> -only the current thread is suspended

> -there is only one argument ('time-to-wait')

> -without the 'time-to-wait' argument, test execution is suspended until the
> current Eclipse jobs are completed, which may be include the task you want
> to wait for

> -with the 'time-to-wait' argument, test execution is suspended for the fixed
> amount of time specified, which may slow test execution to ensure sufficient
> time is specified to cover the entire task

> Unfortunately, there is no way to get the Progress View into a different
> shell.

> Paul
> "Mark Bretl" <markb@ambric.com> wrote in message
> news:b8efb58ca4d95d8245c0d092ffc4ef3c$1@www.eclipse.org...
>>I am using Eclipse 3.3.2 with TPTP 4.4.1 and using the Automated GUI
>>Recorder to execute some test launches. During the recording process, I
>>need to wait for a process to finish before I go on to the next step. I
>>have used the wait command (<command type="wait"/>) and it does not seem to
>>wait for the process I want. The wait command does work well when during
>>the first part of the launch where I have the building steps in a separate
>>ProgressMonitorDialog, here is an example:
>>
>> <shell descriptive="Build for launch"
>> id=" org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og "
>> return-code="0">
>> <command type="wait"/>
>> </shell>
>>
>> But for the actual launch execution I using a proprietary TestRunner,
>> which logs into the console and a process in the Progress View. Using AGR
>> I am able to get focus on the Progress View, but I dont know how to make
>> it wait for all the process to be done within the Progress View. Here is
>> an example of Progress View focus:
>>
>> <command type="focus" contextId="view/org.eclipse.ui.views.ProgressView"
>> widgetId="org.eclipse.swt.widgets.Composite#1"/>
>> I tried to change 'focus' to 'wait', but that did not work. Besides the
>> 'time-to-wait' argument, what other types of arguments does the wait
>> command take? Would it be possible to get Progress View to get into a
>> different shell so I can isolate the process threads?
>>
>> Thanks,
>>
>> Mark
>>
Re: Waiting for process [message #137386 is a reply to message #137292] Thu, 23 October 2008 11:39 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 975
Registered: July 2009
Senior Member
Hi Mark,
Great work! Would you be interested in contributing this code to the
TPTP project? If so, please review the Eclipse Legal process for
contribution (Figure 3 of
http://www.eclipse.org/legal/EclipseLegalProcessPoster.pdf) and open a
defect with the fix attached as a patch.

Thanks,
Paul
"Mark Bretl" <markb@ambric.com> wrote in message
news:cbdfea2323115a0281bb8e4b5a17857d$1@www.eclipse.org...
> With some investigative work, I found out that the wait was only waiting
> for non-System Eclipse jobs. This caused me issues since once a launch
> has been executed, the job is removed from the JobManager. I needed to
> find out how to change the wait to look launches too and I have been able
> to modify the wait command to wait for a launch to finish.
>
> What I was able to do:
>
> Assume: Only one launch at a time and always wait until launch is finished
>
> What I changed:
> Modified the wait command for when the "time-to-wait"= 1, poll the
> ILaunchManager for any launches, wait for the launch to be terminated,
> then return from the wait command
>
> I figured that the value of 1 was safe for me to use since there is not
> much use for waiting 1ms. It is somewhat of a hack with a few
> assumptions, but it works and now my tests function correctly. When I
> have more time, I hope to extend the wait command to accept a new
> attribute so that I do not rely on a 'key value' from the "time-to-wait"
> attribute.
> Hope that might be able to help others in thinking about their own waiting
> issues.
>
> Mark
>
> Paul Slauenwhite wrote:
>
>> Hi Mark,
>> With the AGR, there is little support for controlling the timing of a
>> test execution. In fact, the 'wait' command is the only way to do this
>> but there are limitations (see
> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI-4-5-0.html#2.5):
>
>> -only the current thread is suspended
>
>> -there is only one argument ('time-to-wait')
>
>> -without the 'time-to-wait' argument, test execution is suspended until
>> the current Eclipse jobs are completed, which may be include the task you
>> want to wait for
>
>> -with the 'time-to-wait' argument, test execution is suspended for the
>> fixed amount of time specified, which may slow test execution to ensure
>> sufficient time is specified to cover the entire task
>
>> Unfortunately, there is no way to get the Progress View into a
>> different shell.
>
>> Paul
>> "Mark Bretl" <markb@ambric.com> wrote in message
>> news:b8efb58ca4d95d8245c0d092ffc4ef3c$1@www.eclipse.org...
>>>I am using Eclipse 3.3.2 with TPTP 4.4.1 and using the Automated GUI
>>>Recorder to execute some test launches. During the recording process, I
>>>need to wait for a process to finish before I go on to the next step. I
>>>have used the wait command (<command type="wait"/>) and it does not seem
>>>to wait for the process I want. The wait command does work well when
>>>during the first part of the launch where I have the building steps in a
>>>separate ProgressMonitorDialog, here is an example:
>>>
>>> <shell descriptive="Build for launch"
>>> id=" org.eclipse.ui.internal.progress.ProgressMonitorFocusJobDial og "
>>> return-code="0">
>>> <command type="wait"/>
>>> </shell>
>>>
>>> But for the actual launch execution I using a proprietary TestRunner,
>>> which logs into the console and a process in the Progress View. Using
>>> AGR I am able to get focus on the Progress View, but I dont know how to
>>> make it wait for all the process to be done within the Progress View.
>>> Here is an example of Progress View focus:
>>>
>>> <command type="focus" contextId="view/org.eclipse.ui.views.ProgressView"
>>> widgetId="org.eclipse.swt.widgets.Composite#1"/>
>>> I tried to change 'focus' to 'wait', but that did not work. Besides the
>>> 'time-to-wait' argument, what other types of arguments does the wait
>>> command take? Would it be possible to get Progress View to get into a
>>> different shell so I can isolate the process threads?
>>>
>>> Thanks,
>>>
>>> Mark
>>>
>
Previous Topic:null pointer while using ASF...
Next Topic:attach failed error
Goto Forum:
  


Current Time: Thu Apr 25 08:54:40 GMT 2024

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

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

Back to the top