The JWalk Home Page
Start JWalking Here...
JWalk is a tool suite for lazy, systematic unit testing. The
featured JWalkTester tool performs bounded
exhaustive testing of any compiled Java class, supplied by the programmer.
It tests for full conformance to a lazy specification, which is inferred
on-the-fly from the code, by static and dynamic analysis, and from hints
supplied by the programmer.
Lazy systematic unit testing
is based on the two notions of
lazy specification, in which the intended specification of a class
stabilizes gradually as the design for the class evolves, and systematic
testing, in which the whole state-space of the object is exhaustively
tested for conformance to the specification. The testing method is aimed at
the agile methods community, for whom the production code and saved
tests are the only enduring artifacts. No formal specification need be
produced up-front. The advantage of JWalking over other testing methods is
that the tools can automatically infer the test cases that the programmer
needs to supply, in order to ensure full state and transition coverage of the
inferred specification. The tools construct and present these test cases
automatically, saving the programmer time and effort.
The JWalking Method
The JWalk tools can be used right from the outset, as soon as a prototype
class has been compiled. The programmer follows a
first "exploring" the behaviour of the prototype, generating reports of its
behaviour for manual inspection. If the observed behaviour diverges from
what was expected, changes can be made to the code. Later, the programmer
"validates" the test class, directing the tools to learn the intended
specification incrementally, by a combination of dynamic analysis and limited
user-interaction. As the programmer confirms or rejects key test outcomes,
the quality of the learned test oracle improves, eventually allowing tools to
predict the results of over 90% of new test cases. With a fully trained
oracle, testing is completely automated, testing exhaustively up to the
Depending on the test strategy selected, the tools can explore all method
protocols (all interleaved combinations), all algebraic constructions (all
sequences that put the test object into new states) or all high-level states
and transitions (where the states are inferred automatically from information
given in the test class's interface). Testing can be carried out to an
arbitrary depth chosen by the programmer. Finally, if the source code is
later modified, the tools can re-learn just the parts of the specification
that were changed. So, JWalking is ideally suited to agile methods,
where the code base is expected to change frequently.
JWalk versus JUnit
The software unit testing tool most familiar to the agile community is
JUnit, which allows testers
to run hand-crafted regression tests repeatedly on production classes. In a
with test authoring by an expert JUnit tester, the JWalk tools were able to
test up to two orders of magnitude more cases for the same invested
time and effort! This is because JWalk makes better use of test automation:
- The JUnit tester has to devise suitable tests by hand,
which is hard and error-prone; and
- the JUnit tool merely automates the repeated execution of the tests; and
- the saved regression tests cannot exercise new behaviour introduced later.
- The JWalk tools propose all the significant test cases systematically; and
- the JWalk tester merely has to confirm a subset of test outcomes; and
- the JWalk tools predict the test outcomes for many more test-cases; and
- the JWalk tools generate new tests after a class's behaviour has changed.
JWalk tools take the effort of thinking up the right test cases away from the
tester, by proposing the cases that even the expert fails to discover. When
the test class is modified or extended by subclassing, JWalk generates exactly
those new test cases that are required for all novel interleaved combinations
of local and inherited methods.
This is much more discriminating than regression testing using saved JUnit
test suites. Eventually, fully trained test oracles are capable of detecting
every mutation made to the code of the test class. JWalk provides the full
power of specification-based conformance testing for programmers who don't
want to write formal specifications!
JWalk Tool Suite
We are pleased to announce the availability of the
JWalk 1.1 tool suite, which includes two finished tools and a component kit for creating your own
JWalk applications. Built using run-anywhere Java, the tools configure
themselves to the host's operating system, whether Windows, Unix, Linux or
Mac (see the featured JWalkTester running
on Linux with Gnome, oppposite, and on Windows 7, above).
The user experience has been improved since the last public release of the
the JWalk 1.0 tool kit, by multi-threading the application. The GUI no
longer waits for the test engine to complete, but offers instant access to
early test results. The animation now indicates how hard the engine is
working, and the user may choose to cancel a job in progress. The core
JWalker test engine has been upgraded to
support being executed in the background, as a worker thread. The test
generation, test pruning and test prediction algorithms are still as
powerful as in the earlier release. Likewise, the test customisation
interface supports uploading the same simple, black-box
CustomGenerator test input generators.
Two finished tools are
currently supplied with the download bundle.
JWalkTester is the flagship tool, a GUI-based
Java class unit tester.
JWalkUtility is the original command-line
utility printing results to standard output. Further tools are in
preparation, including a complete rebuild of
JWalkEditor, an integrated Java editing,
compiling and testing environment; and
JWalkMarker, an instructor's tool that supports
the automatic grading of student coding assignments.