MUnit 3.0


MUnit is a simple framework to write repeatable tests for GE Smallworld environment. It is an instance of the xUnit architecture for unit testing frameworks.

Contents of the Release

README.html  : this file
cpl-v10.html : Common Public License - v 1.0
base : the source code of the MUnit framework and text UI
munit_xml : the source code for reporting results to xml
magik_gui : the source code of the MUnit GUI

Installation

Below are the installation steps for installing MUnit:

  1. First, download the latest version of MUnit, referred to below as munit_XX.zip from \\uranium\winroot\swdev\release\munit
  2. Unzip the munit.zip distribution file to a directory of your choice. (e.g. "c:\munit" )
  3. Load module definition to image by sw_module_manager.load_standalone_module_definition( "c:\munit\base" )
  4. Load MUnit module to image sw_module_manager.load_module( "munit_base" )

Optional

  1. Load MUnit tests module definition to image by sw_module_manager.load_standalone_module_definition( "c:\munit\tests" )
  2. Load test module to image sw_module_manager.load_module( "munit_tests" )
  3. and
  4. Load MUnit magik GUI module definition to image by sw_module_manager.load_standalone_module_definition( "c:\munit\magik_gui" )
  5. Load MUunit magik GUI module to image sw_module_manager.load_module( "munit_magik_gui" )

Test the installation by using either the textual or graphical test runner to run the munit tests distributed with MUnit.

MagikSF> test_runner.run( all_munit_tests )
$
........................................
........................................
......................................
Time: 1 seconds 172 milliseconds
OK (118 tests) [244 assertions]

MagikSF> test_runner_dialog.open()
$
a sw:test_runner_dialog

and select all_munit_tests suite and use "Run" button to run unit tests.

All the tests should pass with an "OK" (textual) or a green bar (graphical).

Documentation

License
    The terms of the common public license used for MUnit.

Extending MUnit

Examples of possible MUnit extensions can be found in the munit/base/source/extensions directory: