Introduction
...
This smoke test just consists of running a demo app. The app in question,
trunk/support/prototype
...
,
...
I'm
...
hoping
...
will
...
become
...
the
...
basis
...
for
...
an
...
archetype
...
(at
...
which
...
point
...
I'll
...
change
...
this
...
page
...
to
...
start
...
instead
...
with
...
running
...
that
...
archetype).
...
The
...
following
...
assumes
...
that
...
you've
...
successfully
...
built
...
Isis,
...
see
...
...
if
...
not.
...
NB:
...
you'll
...
also
...
need
...
to
...
have
...
built
...
the
...
'release'
...
module
...
(using
...
mvn
...
clean
...
install
...
-D
...
modules=release
...
).
...
Loading
...
the
...
Demo
...
App
...
(into
...
Eclipse)
...
In
...
Eclipse,
...
import
...
the
...
projects
...
into
...
Eclipse:
...
- File
...
- >
...
- Import
...
- >
...
- Maven
...
- >
...
- Existing
...
- Maven
...
- Projects
...
- browse
...
- to
...
trunk/support/prototype
...
- specify the Advanced > Name Template = groupId.artifactId
- otherwise the project names in launch configs will be wrong.
- Refresh
- OK
- specify the Advanced > Name Template = groupId.artifactId
- Project > Build All
- (or just turn on Project > Build Automatically)
Running the Demo App
Viewer | | WAR project | Other type of project | Notes |
---|---|---|---|---|
DnD |
|
...
|
| EmployeeTakeOn not supported | |
HTML |
|
...
|
...
| for quickrun, |
...
browser |
...
to |
...
...
Restful |
|
...
|
...
| for quickrun, |
...
browser |
...
to |
...
...
Wicket |
| |
|
|
Scimpi |
| |
|
|
JUnit Tests | |
| | Runs as a JUnit test |
BDD (Concordion) |
|
| | Runs as a JUnit test, see 'BDD Viewer' project below |
Quick Run Project
Some of the viewers have launch configs within quickrun
project, in ide/eclipse/launch
. These launch configs run org.apache.isis.Isis
...
--viewer
...
xxx
...
.
...
In
...
addition,
...
the
...
src/test/java
...
demonstrates
...
how
...
the
...
JUnit
...
viewer
...
can
...
be
...
used,
...
wrapping
...
each
...
domain
...
object
...
in
...
order
...
to
...
enforce
...
the
...
same
...
rules
...
that
...
the
...
viewers
...
enforce.
...
This
...
can
...
be
...
run
...
either:
...
- in
...
- Eclipse,
...
- right-click
...
- on
...
- the
...
- {{viewer-bdd}
...
- project
...
- and
...
- select
...
- Run
...
- As>Junit
...
- Tests
...
- in
...
- Maven,
...
- just
...
mvn
...
clean
...
test
WAR Projects
All of the webapp-based
...
viewers
...
have
...
their
...
own
...
WAR
...
project.
...
The
...
app
...
can
...
be
...
started
...
in
...
one
...
of
...
several
...
ways:
...
- using
...
- the
...
- launch
...
- configuration
...
ide/eclipse/launch/prototype_xxx.launch
...
- where
xxx
is html, restful, wicket, scimpi - this just runs
org.apache.isis.WebServer
- where
...
- which
...
- boots
...
- up
...
- Jetty
...
- with
...
- the
...
web.xml
...
- browse to http://localhost:8080
...
- using
mvn jetty:run
...
- will need to run
mvn clean install
for the parent project first - cd into the support/prototype directory and do
mvn install
- cd into a viewer directory beneath this, eg
cd viewer_scimpi
- start the web server:
mvn jetty:run
- browse to http://localhost:8080
- will need to run
...
- and
...
- click
...
- the
...
- link
...
- for
...
- the
...
- viewer
...
- you
...
- chose,
...
- eg
...
...
- .
...
- The
...
- Wicket
...
- viewer
...
- needs
...
- a
...
- username
...
- /
...
- password
...
- of
...
- sven
...
- /
...
- pass
...
- as
...
- an
...
- Eclipse
...
- WTP
...
- Server
...
- project
...
BDD
...
Viewer
...
Project
...
The
...
BDD
...
viewer
...
provides
...
an
...
integration
...
between
...
...
and
...
Isis.
...
A
...
little
...
background
...
is
...
probably
...
in
...
order:
...
- Concordion
...
- allows
...
- the
...
- business
...
- analysts
...
- to
...
- specify
...
- the
...
- required
...
- behaviour
...
- of
...
- the
...
- system
...
- using
...
- XHTML;
...
- the
...
- developer
...
- then
...
- annotates
...
- the
...
- XHTML
...
- using
...
concordion:xx
...
- attributes
- these annotations allow the developer to identify inputs (the "givens")
...
- the
...
- methods
...
- to
...
- call
...
- to
...
- exercise
...
- the
...
- system
...
- under
...
- test
...
- (the
...
- "when")
...
- and
...
- to
...
- make
...
- assertions
...
- on
...
- the
...
- resultant
...
- state
...
- of
...
- the
...
- system
...
- (the
...
- "thens")
...
- the
...
- results
...
- of
...
- the
...
- test
...
- are
...
- shown
...
- in
...
- a
...
- copy
...
- of
...
- the
...
- original
...
- test
...
- script,
...
- with
...
- assertions
...
- coloured
...
- to
...
- indicate
...
- whether
...
- they
...
- succeeded
...
- or
...
- failed
...
Normally
...
the
...
developer
...
is
...
required
...
to
...
write
...
the
...
methods
...
to
...
be
...
called
...
themselves;
...
these
...
are
...
in
...
test
...
classes
...
that
...
then
...
exercise
...
the
...
system.
...
The
...
Isis/Concordion
...
integration
...
however
...
provides
...
an
...
abstract
...
JUnit
...
test
...
case
...
whose
...
methods
...
can
...
be
...
called
...
out-of-the-box.
...
These
...
methods
...
are
...
enough
...
to
...
simulate
...
the
...
set
...
of
...
actions
...
provided
...
by
...
any
...
Isis
...
viewer.
...
To
...
try
...
out
...
the
...
viewer:
...
- in
...
- Eclipse,
...
- right-click
...
- on
...
- the
...
- {{viewer-bdd}
...
- project
...
- and
...
- select
...
- Run
...
- As>Junit
...
- Tests
...
- the
...
- output
...
- will
...
- be
...
- in
...
/tmp/concordion/org/apache/isis/support/prototype/stories
...
- in
...
- Maven,
...
- just
...
mvn
...
clean
...
test
...