Simple Unit Testing Toolbox Documentation

Copyright © 2022 Tamas Kis

Contents

Installation

  1. Download the toolbox from File Exchange or https://github.com/tamaskis/Simple_Unit_Testing_Toolbox-MATLAB.
  2. Open the INSTALL folder.
  3. Double-click on Simple Unit Testing Toolbox.mltbx.

MATLAB will automatically perform the installation and add all the contents of the toolbox folder to the MATLAB search path.

Opening this documentation using the MATLAB Command Window.

To open the home page (this page) of the toolbox documentation in MATLAB, type the following in the Command Window:

doc_SUTT

To open the documentation of a specific function or class with name name, type the following in the Command Window:

doc_SUTT name

Test Suites

A test suite is a collection of unit test objects. When a test suite is run, it runs all of the individual unit tests, printing any diagnostic and/or error messages, along with some testing statistics.

Unit Test Objects

Base class for all unit tests:

Specific unit tests:

Individual Unit Testing Functions

These functions implement the core unit testing functionality. They are called on by the unit testing classes, but they can also be used individually, outside the scope of a full test suite framework.