October 1 2003
leJOSUnit is a simple test unit framework for leJOS, a Java Operating System for LEGO (TM) Mindstorms. It is a port of the famous JUnit framework, a testing framework for Java, developed by Kent Beck and Erich Gamma. leJOSUnit has been adopted to the specific requirements (few resources, less footprint) of the leJOS environment.
Download the latest version from leJOSUnit here. For prerequisites see docs/ImplementationDetails.html.
leJOSUnit has been originally developed by Jochen Hiller (jochen.hiller@t-online.de) and will be hosted at SourceForge (http://sourceforge.net/projects/lejosunit).
index.html |
this file |
build.bat, build.sh, build.xml |
Scripts and ant-based build file, to build the leJOSUnit project from the scratch. |
bin/run_examples.bat, bin/run_main.bat |
Scripts to compile and run main programs, e.g. a simple example. |
docs/* |
Additional documentation, implementation details, images, etc. |
docs/api |
The generated JavaDocs (docs/api). |
docs/licenses |
The licenses of the projects used. |
lib/lejosunit-1.0.2.jar |
The library containing only the core framework. This should be the default library to be included, due to the very restricted resources of leJOS. |
lib/lejosunit-1.0.2-complete.jar |
The library containing the core framework, all examples and tests. |
src/java |
The Java source code for leJOSUnit. |
Below are the installation steps for installing leJOSUnit:
lejosunit-1.0.2.zip
filelib/lejosunit-1.0.2.jar
to the CLASSPATH
of
your leJOS project.
main(String[])
method starting the
lejosunit.rcxui.TestRunner
.
To get started with unit testing make familiar yourself using the JUnit framework. See JUnit for more information.
leJOSUnit provides some simple examples as a demonstration how to use
the framework based on the leJOS virtual machine running on LEGO Mindstorms.
See the examples within the package lejosunit.examples
package.
src/java/lejosunit/examples/AllTests.java
src/java/lejosunit/examples/OneTest.java
src/java/lejosunit/examples/TwoTest.java
Notice:
This example can the be compiled, linked and downloaded to the RCX,
using the script bin/run_examples.bat
.
Make sure, that LEJOS_HOME
and JAVA_HOME
are set
to the corresponding directories.
The TestRunner provided by leJOSUnit running on RCX provides this functionality:
Figure 1: The RCX user interface
Run
button will be presses. The running man will then be started.Run
button.Run
button again..
" (dot).F
".E
".Run
button,
it will be displayed for about 1.5 seconds whether the tests have been
sucessful (OK
) or not (FAILS
).
View
(left)
and Prgm
(right) buttons.