|
Lines 24-30
Link Here
|
| 24 |
<meta name="DC.Language" content="en-us" /> |
24 |
<meta name="DC.Language" content="en-us" /> |
| 25 |
<!-- |
25 |
<!-- |
| 26 |
/********************************************************************** |
26 |
/********************************************************************** |
| 27 |
* Copyright (c) 2005, 2006 IBM Corporation. |
27 |
* Copyright (c) 2005, 2007 IBM Corporation. |
| 28 |
* All rights reserved. This content |
28 |
* All rights reserved. This content |
| 29 |
* is made available under the terms of the Eclipse Public License v1.0 |
29 |
* is made available under the terms of the Eclipse Public License v1.0 |
| 30 |
* which accompanies this distribution, and is available at |
30 |
* which accompanies this distribution, and is available at |
|
Lines 39-55
Link Here
|
| 39 |
<link rel="stylesheet" type="text/css" href="../css/book.css" /> |
39 |
<link rel="stylesheet" type="text/css" href="../css/book.css" /> |
| 40 |
<title>Creating a new test recorder</title> |
40 |
<title>Creating a new test recorder</title> |
| 41 |
</head> |
41 |
</head> |
| 42 |
<body id="t_cretestrec"><a name="t_cretestrec"><!-- --></a> |
42 |
<body><a name="t_cretestrec"><!-- --></a> |
| 43 |
<h1 class="topictitle1">Creating a new test recorder</h1> |
43 |
<h1 class="topictitle1">Creating a new test recorder</h1> |
| 44 |
<div><p>To create a test recorder, you extend the recorder user interface |
44 |
<div><p>To create a test recorder, you extend the recorder user interface |
| 45 |
wizard and the four main Generic Recorder Framework (GRF) helper classes in |
45 |
wizard and the four main Generic Recorder Framework (GRF) helper classes in |
| 46 |
the extension point org.eclipse.hyades.test.core.Recorder.</p> |
46 |
the <code>org.eclipse.hyades.test.core.Recorder</code> extension point.</p> |
| 47 |
<div class="section">To create a new test recorder, use the Generic Recorder extension |
47 |
<div class="section">To create a new test recorder, use the Generic Recorder extension |
| 48 |
point to perform the following steps:</div> |
48 |
point to perform the following steps:</div> |
| 49 |
<ol><li><span>Define the Recorder Message Provider.</span></li> |
49 |
<ol><li><span>Define the Recorder Message Provider.</span></li> |
| 50 |
<li><span>Define the Recorder Client Helper.</span></li> |
50 |
<li><span>Define the Recorder Client Helper.</span></li> |
| 51 |
<li><span>Define the Wizard Page Provider.</span></li> |
51 |
<li><span>Define the Wizard Page Provider.</span></li> |
| 52 |
<li><span>Define the Exec Options Provider.</span></li> |
52 |
<li><span>Define the Execution Options Provider.</span></li> |
| 53 |
</ol> |
53 |
</ol> |
| 54 |
<div class="section"><p>Defaults exist for each of these providers. To review the defaults |
54 |
<div class="section"><p>Defaults exist for each of these providers. To review the defaults |
| 55 |
and to see more details about these providers, refer to the <a href="../../org.eclipse.tptp.platform.doc.isv/ref/rextpoint.xhtml#org.eclipse.hyades.test.core.Recorder">generic |
55 |
and to see more details about these providers, refer to the <a href="../../org.eclipse.tptp.platform.doc.isv/ref/rextpoint.xhtml#org.eclipse.hyades.test.core.Recorder">generic |
|
Lines 57-65
Link Here
|
| 57 |
<p><strong>Defining the Recorder |
57 |
<p><strong>Defining the Recorder |
| 58 |
Message Handler</strong></p> |
58 |
Message Handler</strong></p> |
| 59 |
<p>The Recorder Message Provider handles incoming messages |
59 |
<p>The Recorder Message Provider handles incoming messages |
| 60 |
from the RecorderAgent. The RecorderAgent controls how the recorder interprets |
60 |
from the Recorder Agent. The Recorder Agent controls how the recorder interprets |
| 61 |
the application that is being recorded. It is responsible for sending messages |
61 |
the application that is being recorded. It is responsible for sending messages |
| 62 |
back to the Workbench that are intercepted by the IRecorderDataProcessor interface |
62 |
back to the workbench that are intercepted by the <code>IRecorderDataProcessor</code> interface |
| 63 |
where the recording file is actually written. </p> |
63 |
where the recording file is actually written. </p> |
| 64 |
<p>Some default messages |
64 |
<p>Some default messages |
| 65 |
are handled in the Abstract class.</p> |
65 |
are handled in the Abstract class.</p> |
|
Lines 69-75
Link Here
|
| 69 |
</div> |
69 |
</div> |
| 70 |
<p><strong>Defining the Recorder Client Helper</strong></p> |
70 |
<p><strong>Defining the Recorder Client Helper</strong></p> |
| 71 |
<p>The Generic Recorder |
71 |
<p>The Generic Recorder |
| 72 |
Framework (GRF) calls ClientHelper methods during initialization and shutdown. |
72 |
Framework (GRF) calls client helper methods during initialization and shutdown. |
| 73 |
You can add custom initialization code for the extending recorder here. </p> |
73 |
You can add custom initialization code for the extending recorder here. </p> |
| 74 |
<div class="p"><ul><li>Interface: IRecorderClientHelper </li> |
74 |
<div class="p"><ul><li>Interface: IRecorderClientHelper </li> |
| 75 |
<li>Adapter: RecorderClientHelperAdapter </li> |
75 |
<li>Adapter: RecorderClientHelperAdapter </li> |
|
Lines 78-106
Link Here
|
| 78 |
<p><strong>Defining the Wizard Page Provider</strong></p> |
78 |
<p><strong>Defining the Wizard Page Provider</strong></p> |
| 79 |
<p>Use the wizard |
79 |
<p>Use the wizard |
| 80 |
page provider to develop additional pages for the recorder wizard. This is |
80 |
page provider to develop additional pages for the recorder wizard. This is |
| 81 |
the only provider that exists in the org.eclipse.hyades.test.ui project. All |
81 |
the only provider that exists in the <code>org.eclipse.hyades.test.ui</code> project. All |
| 82 |
the other providers are in the org.eclipse.hyades.test.core project.</p> |
82 |
the other providers are in the <code>org.eclipse.hyades.test.core</code> project.</p> |
| 83 |
<div class="p"><ul><li>Interface: IRecorderWizardPageProvider</li> |
83 |
<div class="p"><ul><li>Interface: IRecorderWizardPageProvider</li> |
| 84 |
<li>Default: DefaultRecWizardProvider</li> |
84 |
<li>Default: DefaultRecWizardProvider</li> |
| 85 |
</ul> |
85 |
</ul> |
| 86 |
</div> |
86 |
</div> |
| 87 |
<p>The default produces only one page: the Select Location for Test |
87 |
<p>The default produces only one page: the Select Location for Test |
| 88 |
Suite page.</p> |
88 |
Suite page.</p> |
| 89 |
<p>All pages served must be of type IGenericRecorderPage.</p> |
89 |
<p>All pages served must be of type <code>IGenericRecorderPage</code>.</p> |
| 90 |
<p>For |
90 |
<p>For |
| 91 |
each page, you can optionally define the following methods as well:</p> |
91 |
each page, you can optionally define the following methods as well:</p> |
| 92 |
<div class="p"><ul><li>public String getRecorderData(String key)</li> |
92 |
<div class="p"><ul><li>public String getRecorderData(String key)</li> |
| 93 |
<li>public Object getRecorderObjectData(String key)</li> |
93 |
<li>public Object getRecorderObjectData(String key)</li> |
| 94 |
<li>public void saveSettings();RecorderAgent</li> |
94 |
<li>public void saveSettings()</li> |
| 95 |
</ul> |
95 |
</ul> |
| 96 |
</div> |
96 |
</div> |
| 97 |
<p>The default process for retrieving data from WizardPageProvider |
97 |
<p>The default process for retrieving data from wizard page provider |
| 98 |
is to call the getRecorderData() methods of all pages until the key is found. |
98 |
is to call the <code>getRecorderData()</code> methods of all pages until the key is found. |
| 99 |
Thus, only the getRecorderData() of the pages must be implemented.</p> |
99 |
Thus, only the <code>getRecorderData()</code> of the pages must be implemented.</p> |
| 100 |
<p><strong>Defining |
100 |
<p><strong>Defining |
| 101 |
the Exec Options Provider</strong></p> |
101 |
the Exec Options Provider</strong></p> |
| 102 |
<p>Extend the Exec Options Provider to enable |
102 |
<p>Extend the Exec Options Provider to enable |
| 103 |
agent parameters to be set before the RecorderAgent is launched. For example, |
103 |
agent parameters to be set before the Recorder Agent is launched. For example, |
| 104 |
you can define JVM arguments or enable additional files to be deployed.</p> |
104 |
you can define JVM arguments or enable additional files to be deployed.</p> |
| 105 |
<div class="p"><ul><li>Interface: IRecorderExecOptionsProvider</li> |
105 |
<div class="p"><ul><li>Interface: IRecorderExecOptionsProvider</li> |
| 106 |
<li>Abstract class: AbstractRecorderExecOptionsProvider</li> |
106 |
<li>Abstract class: AbstractRecorderExecOptionsProvider</li> |
|
Lines 108-114
Link Here
|
| 108 |
</div> |
108 |
</div> |
| 109 |
<p>After you have extended the recorder user interface wizard and |
109 |
<p>After you have extended the recorder user interface wizard and |
| 110 |
the four main GRF helper classes, your new recorder will be set to display |
110 |
the four main GRF helper classes, your new recorder will be set to display |
| 111 |
in the Select a recorder type window.</p> |
111 |
in the <i>Select a Recorder Type</i> window.</p> |
| 112 |
</div> |
112 |
</div> |
| 113 |
</div> |
113 |
</div> |
| 114 |
<div> |
114 |
<div> |