Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Use AGR to help refactor code?
Use AGR to help refactor code? [message #138221] Mon, 17 November 2008 16:52 Go to next message
Eclipse UserFriend
Originally posted by: zhengxie.ie.ibm.com

New to AGR, please pardon me.

I have a plugin which makes contribution to UI and in need of refactor.
I'd like to create an automated GUI test suite before the refactor. So
AGR(TPTP Automated GUI Recorder) came into sight. After checking out the
examples in
http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html,
my question is:
Where can I record the test suite? Should I go to runtime?

The example records the GUI in development workbench. But I change
(refactor) code in development workbench and only in runtime, the change
takes into effect.

So it looks like I need to create test suite in runtime. But then every
time before I test, I need to launch runtime application first? or if I
record in the development workbench, then the launch of runtime is recorded?

Thanks for your answer.

Jen
Re: Use AGR to help refactor code? [message #138295 is a reply to message #138221] Tue, 18 November 2008 12:24 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 970
Registered: July 2009
Senior Member
Hi Jen,
Recording with the AGR is done in the development workbench using the
development workspace. When the test is executed, the target
workbench/workspace are defined in the Configuration pane of the Overview
tab in the AGR Test Suite editor. In you case, you need to refactor your UI
plug-in, export them as deployable plug-ins/features to a runtime instance
of Eclipse, and execute your AGR test suite against that runtime instance of
Eclipse.

Paul
"Zheng Xie" <zhengxie@ie.ibm.com> wrote in message
news:gfs7g1$59f$1@build.eclipse.org...
> New to AGR, please pardon me.
>
> I have a plugin which makes contribution to UI and in need of refactor.
> I'd like to create an automated GUI test suite before the refactor. So
> AGR(TPTP Automated GUI Recorder) came into sight. After checking out the
> examples in
> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html,
> my question is:
> Where can I record the test suite? Should I go to runtime?
>
> The example records the GUI in development workbench. But I change
> (refactor) code in development workbench and only in runtime, the change
> takes into effect.
>
> So it looks like I need to create test suite in runtime. But then every
> time before I test, I need to launch runtime application first? or if I
> record in the development workbench, then the launch of runtime is
> recorded?
>
> Thanks for your answer.
>
> Jen
>
Re: Use AGR to help refactor code? [message #138415 is a reply to message #138295] Wed, 19 November 2008 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zhengxie.ie.ibm.com

Thanks Paul,

I managed to record GUI in the development workbench. Fortunately the
GUI is in a perspective different from the plugin development
perspective. So I have a GUI clean of all the plugins. Then I import the
input data for GUI recording into the runtime workspace, so when the
runtime starts in the target perspective, it appears the same as the
development workbench when I did the recording. By this way, I was able
to change a little code, then run the test from development workbench.
Save the hassle of deployment as you mentioned. I'm sure your way is the
proper way. But just for refactoring code, when you want to change
little, test, then change little, it is a bit too much work.

Hope in the new release, there can be some consideration into this.

I'd like to set up breakpoint in the verification hook class. Since I
didn't development the code and not familiar with the widgets. It would
be nice to be able to debug when the test is run.

I'll start another thread on this question.

Thanks a million.

Jen
Paul Slauenwhite wrote:
> Hi Jen,
> Recording with the AGR is done in the development workbench using the
> development workspace. When the test is executed, the target
> workbench/workspace are defined in the Configuration pane of the Overview
> tab in the AGR Test Suite editor. In you case, you need to refactor your UI
> plug-in, export them as deployable plug-ins/features to a runtime instance
> of Eclipse, and execute your AGR test suite against that runtime instance of
> Eclipse.
>
> Paul
> "Zheng Xie" <zhengxie@ie.ibm.com> wrote in message
> news:gfs7g1$59f$1@build.eclipse.org...
>> New to AGR, please pardon me.
>>
>> I have a plugin which makes contribution to UI and in need of refactor.
>> I'd like to create an automated GUI test suite before the refactor. So
>> AGR(TPTP Automated GUI Recorder) came into sight. After checking out the
>> examples in
>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html,
>> my question is:
>> Where can I record the test suite? Should I go to runtime?
>>
>> The example records the GUI in development workbench. But I change
>> (refactor) code in development workbench and only in runtime, the change
>> takes into effect.
>>
>> So it looks like I need to create test suite in runtime. But then every
>> time before I test, I need to launch runtime application first? or if I
>> record in the development workbench, then the launch of runtime is
>> recorded?
>>
>> Thanks for your answer.
>>
>> Jen
>>
>
>
Re: Use AGR to help refactor code? [message #138452 is a reply to message #138415] Wed, 19 November 2008 12:01 Go to previous message
Paul Slauenwhite is currently offline Paul SlauenwhiteFriend
Messages: 970
Registered: July 2009
Senior Member
Hi Jen,
Glad to hear you found an easier way to run your tests.

In TPTP 4.5, the AGR was moved from a Technology Preview component to an
As-Is component. As-Is components are primarily provided for prior users
but imply no support (for example, defects, news group, and mailing lists)
or commitment to triage or resolve opened defects. Any changes to the
existing AGR code would require a patch from a contributor including code to
resolve the symptom and test cases to test the fix.

That said, there is an enhancement for support user-specified JVM
parameters, include debug options, for test execution. If you are
interested in commenting and/or contributing, see:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=129622

Paul
"Zheng Xie" <zhengxie@ie.ibm.com> wrote in message
news:gg0m0k$h6d$1@build.eclipse.org...
> Thanks Paul,
>
> I managed to record GUI in the development workbench. Fortunately the GUI
> is in a perspective different from the plugin development perspective. So
> I have a GUI clean of all the plugins. Then I import the input data for
> GUI recording into the runtime workspace, so when the runtime starts in
> the target perspective, it appears the same as the development workbench
> when I did the recording. By this way, I was able to change a little code,
> then run the test from development workbench. Save the hassle of
> deployment as you mentioned. I'm sure your way is the proper way. But just
> for refactoring code, when you want to change little, test, then change
> little, it is a bit too much work.
>
> Hope in the new release, there can be some consideration into this.
>
> I'd like to set up breakpoint in the verification hook class. Since I
> didn't development the code and not familiar with the widgets. It would be
> nice to be able to debug when the test is run.
>
> I'll start another thread on this question.
>
> Thanks a million.
>
> Jen
> Paul Slauenwhite wrote:
>> Hi Jen,
>> Recording with the AGR is done in the development workbench using the
>> development workspace. When the test is executed, the target
>> workbench/workspace are defined in the Configuration pane of the Overview
>> tab in the AGR Test Suite editor. In you case, you need to refactor your
>> UI plug-in, export them as deployable plug-ins/features to a runtime
>> instance of Eclipse, and execute your AGR test suite against that runtime
>> instance of Eclipse.
>>
>> Paul
>> "Zheng Xie" <zhengxie@ie.ibm.com> wrote in message
>> news:gfs7g1$59f$1@build.eclipse.org...
>>> New to AGR, please pardon me.
>>>
>>> I have a plugin which makes contribution to UI and in need of refactor.
>>> I'd like to create an automated GUI test suite before the refactor. So
>>> AGR(TPTP Automated GUI Recorder) came into sight. After checking out the
>>> examples in
>>> http://www.eclipse.org/tptp/test/documents/userguides/Intro- Auto-GUI.html,
>>> my question is:
>>> Where can I record the test suite? Should I go to runtime?
>>>
>>> The example records the GUI in development workbench. But I change
>>> (refactor) code in development workbench and only in runtime, the change
>>> takes into effect.
>>>
>>> So it looks like I need to create test suite in runtime. But then every
>>> time before I test, I need to launch runtime application first? or if I
>>> record in the development workbench, then the launch of runtime is
>>> recorded?
>>>
>>> Thanks for your answer.
>>>
>>> Jen
>>>
>>
Previous Topic:Where are piAgent source codes?
Next Topic:AGR break points in verification hook class
Goto Forum:
  


Current Time: Mon Dec 22 20:48:44 GMT 2014

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

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