matlab-xunit Release History
- Add compatibility with R2016b and newer. #19
- Fix issue with a partial path that is also on the MATLAB path. #14
- Fix a broken link in the documentation. #17
- Adding JUnit-style XML output.
- Renaming "runtests" command to "runxunit".
- Removing "obsolete" subdirectory.
- Introduction of semver for versioning, semvername for naming, and ISO 8601 for release dates.
Add -logfile option to runtests.
Allow test names to be passed to runtests as a cell array of strings.
Add test suite name and execution date to output of runtests.
Added warning message if function-handle-based test file has a setup function
that returns more than one output argument.
Fix bug related to handling subfunction test files in packages.
Fix TestSuite.fromPackageName to find tests inside subpackages.
Correct text in exTestCaseSearching.m to show that test files and functions
can begin or end with "test" or "Test".
Fixed bug that caused TestCase subclasses in a test package to
be executed twice in some versions of MATLAB.
Documented the out = runsuite(...) syntax.
Added home doc links to the various doc pages.
Fixed handling of TestCase subclasses in a test package.
- Added capability to run tests stored inside packages.
- runtests errors if no test cases are found instead
of silently passing.
- Accept function names that end in "test" or "Test" as test functions.
- In assertElementsAlmostEqual and assertVectorsAlmostEqual, change the
default floor_tol value to sqrt(eps) instead of eps. This makes the assertion
a bit more forgiving when comparing numbers very close to 0.
- Added -verbose option to runtests.
- Fixed handling of message strings containing sprintf-style control characters
in the assert*.m functions.
Corrected errors in assertElementsAlmostEqual and assertVectorsAlmostEqual
related to NaN and Inf inputs. assertElementsAlmostEqual now properly
asserts when one input is finite and the other is infinite.
assertVectorsAlmostEqual now asserts whenever any input element is NaN
or infinite. The behavior of xunit.utils.compareFloats has been changed
The name of the package has been changed to "MATLAB xUnit Test Framework."
The command-line test runner is now called runtests. The utilities
package is now called xunit.utils. If you want to continue using
the old command-line test runner (mtest) and utilities package
(mtest.utils), then put the obsolete directory on the
The assertion functions assertEqual, assertElementsAlmostEqual,
and assertVectorsAlmostEqual now print more information about the input
values in the case of an assertion failure.
A new assertion function, assertFilesEqual, has been added.
The command-line test runner, runtests, now supports multiple directory
The assertion function assertAlmostEqual has been deprecated. Use
assertElementsAlmostEqual and assertVectorsAlmostEqual
instead. If you want to continue using assertAlmostEqual, then
put the obsolete directory on the MATLAB path.
Remove the LICENSE.txt file because the open source BSD license is
now supplied automatically by the MATLAB Central File Exchange.
There are no functional changes in this version.
This release fixes a bug with assertVectorsAlmostEqual when
the caller provided a custom message. When the function errored out
because the tolerance was exceeded, the function would issue a
different error message than expected.
This release fixes a problem when calling mtest with no input
arguments. Previously, it was not limiting its test-case discovery
to TestCase subclasses and ordinary M-files beginning with "test"
or "Test" as documented.
This release also integrates the MTEST documentation with the MATLAB
This release adds new tools for performing floating-point
comparisons. Using the new assertion functions
assertVectorsAlmostEqual, you can perform both
absolute and relative tolerance comparisons, either elementwise
or in a vector L2-norm fashion.
The previous floating-point comparison function,
assertAlmostEqual, is still available, but its
use is discouraged.
This release, the first to be posted on the MATLAB Central File
Exchange, includes a refactoring of TestCase and TestSuite to use
the composite design pattern. Both classes now subclass the
abstract class TestComponent, and the individual items contained
in a TestSuite object are TestComponent objects. That means
a TestSuite object can contain both TestSuite objects and
TestSuites are now built up hierarchically. All the test cases
in a subfunction-based test M-file become a test suite, which in
turn can be part of a test suite for an entire test directory.
The mtest driver function can now take the name of a directory,
in which case it will automatically discover and run all the test
cases in that directory.
The old TestRunObserver class has become the abstract TestRunMonitor
class, with subclasses TestRunLogger and CommandWindowTestRunDisplay.
TestCaseInDir has been modified to do a directory change before
executing the test case. The new class TestCaseWithAddPath makes
a temporary path addition before executing the test case.
Subfunction-based test M-files written for one of the alpha versions
of MTEST need to be revised so that the output variable name is
"test_suite", and so that the first line of code calls the script
This release is an extensive update that provides simpler ways of
writing and running test cases.
The new function mtest automatically finds and runs all test
cases in the current directory.
Test cases can be written as simple M-file functions.
Multiple test cases can be defined in a single M-file by using
Many new documentation examples have been provided, including a
"Quick Start" example intended to enable users to write and
run their first tests in just a few minutes.
Some of the sample TestCase classes were missing classdef lines.
Now using dot method invocation syntax in examples and doc.
Minor edits to HTML doc (munit_doc.html).
Edited munit_doc.html by hand to clean up command-window links.
Limited initial distribution for review and comment.