- Functions creating isolated test environments.
- Tools simplifying creation of custom tests.
- Tools for creation of reusable test cases (collections of tests).
- Customizable automatic failure messages.
- 11 new specialized test functions and 4 test case functions.
-
Mathematica versions 8.0, 9.0 or 10.0
-
MUnit versions:
- 1.3 - version distributed with Wolfram Workbench 2.0,
- 1.4 - version distributed with Mathematica 10.0.
To install MUnitExtras package evaluate:
Get["https://raw.githubusercontent.com/jkuczm/MUnitExtras/master/BootstrapInstall.m"]
Note that this will also install dependencies: EvaluationUtilities, MessagesUtilities, OptionsUtilities, PatternUtilities, ProtectionUtilities, StringUtilities and ProjectInstaller package, if you don't have it already installed.
-
Download latest released MUnitExtras.zip file.
-
Extract downloaded
MUnitExtras.zip
to any directory which is on Mathematica$Path
, e.g. to one obtained by evaluatingFileNameJoin[{$UserBaseDirectory,"Applications"}]
. -
Install dependencies: EvaluationUtilities, MessagesUtilities, OptionsUtilities, PatternUtilities, ProtectionUtilities, StringUtilities
To load MUnitExtras in *.mt
file run with
Workbenchs test runner
add Needs["MUnitExtras`"]
to the file.
To use MUnitExtras in Mathematica versions < 10.0 outside of Workbenchs test
runner, you must find MUnit package in your Workbench installation directory
and add its location to Mathematica $Path
:
$Path =
DeleteDuplicates @ Prepend[
$Path,
FileNameJoin["/path/to/eclipse/configuration/org.eclipse.osgi/bundles/497/1/.cp/MathematicaSourceVersioned/Head"]
];
Needs["MUnitExtras`"]
(change
/path/to/eclipse/configuration/org.eclipse.osgi/bundles/497/1/.cp
to location of MUnit on your system).
To load MUnitExtras in Mathematica version 10.0 evaluate
Needs["MUnitExtras`"]
Real documentation is currently non-existent, except for usage messages.
*.mt
files in Usage
directory are supposed to be a lame substitute.
Look also at acceptance and unit tests for more usage examples.
If you find any bugs or have feature request please create an issue on GitHub.
Feel free to fork and send pull requests.
If you want to use Ant scripts from this repository you will also need to install WWBCommon project.
All contributions are welcome!
This package is released under The MIT License.
Releases of this package will be numbered using Semantic Versioning guidelines.