IBM E02HMLL-I Implementation Guide - Page 221

Enabling, Integrated, Environment, create, custom, batch, Working, projects, units

Page 221 highlights

2. Add the -design option to the line in the batch file where the Java program is executed to start the server. You should add the -design option after the -s%SERVERNAME% option. The following example shows how the batch file should appear: %CWJAVA% -Djava.ext.dirs=%JRE_EXT_DIRS%;"%MQ_LIB%";"%DB2_LIB%" -Duser.home="%CROSSWORLDS%" -mx%CW_MEM_HEAP%m -DTEAgent=1200 -DCW_MEMORY_MAX=%CW_MEM_HEAP% %ORB_PROPERTY% -classpath %JCLASSES% ServerWrapper -s%SERVERNAME% -design %2 %3 3. Save and close the file. Enabling Integrated Test Environment to create a custom batch file You can configure Integrated Test Environment to start InterChange Server Express in design mode automatically. With this approach, Integrated Test Environment reads in the start_server.bat file and determines if the -design option has been specified properly or not. It then creates a file named start_server_ite_tmp.bat as a copy of the start_server.bat file and adds the -design option if it has not been properly specified. If you start the server from within Integrated Test Environment then it uses this temporary file. Do the following to configure the Integrated Test Environment preferences to create a temporary batch file: 1. Select Window > Preferences from the menu bar of the workbench. 2. Expand Integrated Test Environment. 3. Select Test Server. Figure 58 on page 207 shows the Test Server preferences. 4. Enable the Verify server launch script (start_server.bat) checkbox to have Integrated Test Environment use a custom batch file to which it adds the necessary configuration information. If you do not plan to use the custom batch file that Integrated Test Environment can create, leave the Verify server launch script (start_server.bat) checkbox disabled and be sure to follow the instructions in "Setting the RMI port in start_server.bat" on page 208 to add the configuration information yourself. 5. Click OK. Important: For this approach to work, you must start the server from Integrated Test Environment. If you start the server using the program group shortcut or the command line then this approach will not work, because those startup techniques do not use the temporary startup script. Working with test projects and units All resources in an Eclipse-based platform are contained in projects, as described in "Projects" on page 38.. You must create integration component library projects to contain integration components, you must create user projects to contain shortcuts to components, and you must create test projects in the Integrated Test Environment to contain definitions for tests. A test unit is a resource created in the workbench that defines a test. Integrated Test Environment is designed to let you test an entire interface, and an interface typically centers around a collaboration object, as described in "Interfaces" on page 21 Chapter 12. Using Integrated Test Environment 209

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238
  • 239
  • 240
  • 241
  • 242
  • 243
  • 244
  • 245
  • 246
  • 247
  • 248
  • 249
  • 250
  • 251
  • 252
  • 253
  • 254
  • 255
  • 256
  • 257
  • 258
  • 259
  • 260
  • 261
  • 262
  • 263
  • 264
  • 265
  • 266
  • 267
  • 268
  • 269
  • 270
  • 271
  • 272
  • 273
  • 274
  • 275
  • 276
  • 277
  • 278
  • 279
  • 280
  • 281
  • 282
  • 283
  • 284
  • 285
  • 286
  • 287
  • 288
  • 289
  • 290
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • 298
  • 299
  • 300
  • 301
  • 302

2.
Add
the
-design
option
to
the
line
in
the
batch
file
where
the
Java
program
is
executed
to
start
the
server.
You
should
add
the
-design
option
after
the
-s%SERVERNAME%
option.
The
following
example
shows
how
the
batch
file
should
appear:
%CWJAVA%
-Djava.ext.dirs=%JRE_EXT_DIRS%;"%MQ_LIB%";"%DB2_LIB%"
-Duser.home="%CROSSWORLDS%"
-mx%CW_MEM_HEAP%m
-DTEAgent=1200
-DCW_MEMORY_MAX=%CW_MEM_HEAP%
%ORB_PROPERTY%
-classpath
%JCLASSES%
ServerWrapper
-s%SERVERNAME%
-design
%2
%3
3.
Save
and
close
the
file.
Enabling
Integrated
Test
Environment
to
create
a
custom
batch
file
You
can
configure
Integrated
Test
Environment
to
start
InterChange
Server
Express
in
design
mode
automatically.
With
this
approach,
Integrated
Test
Environment
reads
in
the
start_server.bat
file
and
determines
if
the
-design
option
has
been
specified
properly
or
not.
It
then
creates
a
file
named
start_server_ite_tmp.bat
as
a
copy
of
the
start_server.bat
file
and
adds
the
-design
option
if
it
has
not
been
properly
specified.
If
you
start
the
server
from
within
Integrated
Test
Environment
then
it
uses
this
temporary
file.
Do
the
following
to
configure
the
Integrated
Test
Environment
preferences
to
create
a
temporary
batch
file:
1.
Select
Window
>
Preferences
from
the
menu
bar
of
the
workbench.
2.
Expand
Integrated
Test
Environment
.
3.
Select
Test
Server
.
Figure
58
on
page
207
shows
the
Test
Server
preferences.
4.
Enable
the
Verify
server
launch
script
(start_server.bat)
checkbox
to
have
Integrated
Test
Environment
use
a
custom
batch
file
to
which
it
adds
the
necessary
configuration
information.
If
you
do
not
plan
to
use
the
custom
batch
file
that
Integrated
Test
Environment
can
create,
leave
the
Verify
server
launch
script
(start_server.bat)
checkbox
disabled
and
be
sure
to
follow
the
instructions
in
“Setting
the
RMI
port
in
start_server.bat”
on
page
208
to
add
the
configuration
information
yourself.
5.
Click
OK
.
Important:
For
this
approach
to
work,
you
must
start
the
server
from
Integrated
Test
Environment.
If
you
start
the
server
using
the
program
group
shortcut
or
the
command
line
then
this
approach
will
not
work,
because
those
startup
techniques
do
not
use
the
temporary
startup
script.
Working
with
test
projects
and
units
All
resources
in
an
Eclipse-based
platform
are
contained
in
projects,
as
described
in
“Projects”
on
page
38..
You
must
create
integration
component
library
projects
to
contain
integration
components,
you
must
create
user
projects
to
contain
shortcuts
to
components,
and
you
must
create
test
projects
in
the
Integrated
Test
Environment
to
contain
definitions
for
tests.
A
test
unit
is
a
resource
created
in
the
workbench
that
defines
a
test.
Integrated
Test
Environment
is
designed
to
let
you
test
an
entire
interface,
and
an
interface
typically
centers
around
a
collaboration
object,
as
described
in
“Interfaces”
on
page
21
Chapter
12.
Using
Integrated
Test
Environment
209