Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » May I define variable in AGR?
May I define variable in AGR? [message #64273] Wed, 05 April 2006 09:42 Go to next message
simoom chen is currently offline simoom chenFriend
Messages: 14
Registered: July 2009
Junior Member
I have such a macro!
And I want to define line-numbers-Hello_java.etm as a vairable and it will
be reusable
How?
<macro version="0.1" >
<shell id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
<command type="item-expand"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}" value="true">
<item
path="org.eclipse.swt.widgets.TreeItem#{{/profile}}-{{1.0}} "/>
</command>
<command type="focus"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Composite#1"/>
<command type="item-select"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}">
<item
path=" org.eclipse.swt.widgets.TreeItem#{{/profile/line-numbers-Hel lo_java.etm}}-{{1.0}} "/>
</command>
<command type="select"
contextId=" popup/view/org.eclipse.jdt.ui.PackageExplorer/org.eclipse.sw t.widgets.Tree#{{/}}-{{1.0}} "
widgetId="defid/org.eclipse.jdt.ui.edit.text.java.open.editor2 "/>
<command type="item-expand"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}" value="false">
<item
path="org.eclipse.swt.widgets.TreeItem#{{/profile}}-{{1.0}} "/>
</command>
<command type="item-select"
contextId="view/org.eclipse.jdt.ui.PackageExplorer"
widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}">
</command>
<command type="verification"
contextId=" editor/com.ibm.vpa.pa.etunetprofeditor/line-numbers-Hello_ja va.etm "
location="/vpatest/src" resource="com.ibm.vpa.ui.vpatest.pa.OpenProfile"
hook="verifyetmroot:Qorg.eclipse.ui.IEditorPart;"/>
<command type="wait"/>
</shell>
</macro>
Re: May I define variable in AGR? [message #65774 is a reply to message #64273] Tue, 11 April 2006 18:59 Go to previous message
No real name is currently offline No real nameFriend
Messages: 404
Registered: July 2009
Senior Member
At this point you can only associate user input to a variable. What you're
suggesting here is associating a fragment of the macro with a variable.

You can open a feature against the auto GUI component for this to be
considered.

In the mean time you can use the following workaround if
line-numbers-Hello_java.etm appears once in the macro:



- Create test case A that will contain the macro you listed below from the
first line to the point where line-numbers-Hello_java.etm occurs

- Create test case B1, B2,..., Bn that contains the item-select command for
each of the expected values that should be substituted with
line-numbers-Hello_java.etm

- Create test case C that will contain everything after the occurrence of
the fragment that contains line-numbers-Hello_java.etm




"simoom" <hugulas@gmail.com> wrote in message
news:e10378$ge3$1@utils.eclipse.org...
> I have such a macro!
> And I want to define line-numbers-Hello_java.etm as a vairable and it will
> be reusable
> How?
> <macro version="0.1" >
> <shell id="org.eclipse.ui.internal.WorkbenchWindow" return-code="-1">
> <command type="item-expand"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}" value="true">
> <item
> path="org.eclipse.swt.widgets.TreeItem#{{/profile}}-{{1.0}} "/>
> </command>
> <command type="focus"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Composite#1"/>
> <command type="item-select"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}">
> <item
>
path=" org.eclipse.swt.widgets.TreeItem#{{/profile/line-numbers-Hel lo_java.et
m}}-{{1.0}}"/>
> </command>
> <command type="select"
>
contextId=" popup/view/org.eclipse.jdt.ui.PackageExplorer/org.eclipse.sw t.wid
gets.Tree#{{/}}-{{1.0}}"
> widgetId="defid/org.eclipse.jdt.ui.edit.text.java.open.editor2 "/>
> <command type="item-expand"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}" value="false">
> <item
> path="org.eclipse.swt.widgets.TreeItem#{{/profile}}-{{1.0}} "/>
> </command>
> <command type="item-select"
> contextId="view/org.eclipse.jdt.ui.PackageExplorer"
> widgetId="org.eclipse.swt.widgets.Tree#{{/}}-{{1.0}}">
> </command>
> <command type="verification"
>
contextId=" editor/com.ibm.vpa.pa.etunetprofeditor/line-numbers-Hello_ja va.et
m"
> location="/vpatest/src" resource="com.ibm.vpa.ui.vpatest.pa.OpenProfile"
> hook="verifyetmroot:Qorg.eclipse.ui.IEditorPart;"/>
> <command type="wait"/>
> </shell>
> </macro>
>
>
Previous Topic:Testing SWT GUI without AGR
Next Topic:AGR from JUnits
Goto Forum:
  


Current Time: Mon Dec 22 20:49:53 GMT 2014

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

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