No BSD License  

Highlights from
MATLAB/Simulink Unit Test Framework

2.0

2.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 10.84 KB File ID: #10861

MATLAB/Simulink Unit Test Framework

by Carl Kritzinger

 

25 Apr 2006 (Updated 26 Apr 2006)

A unit test framework for matlab and simulink components

| Watch this File

File Information
Description

Unit testing is a very powerful tool for maintaining high quality code. My code base consists of a mixture of matlab and simulink and this toolkit is an attempt to create a unified unit testing framework for my code. Unfortunately, the simulink part of this toolkit is heavily dependant on my model creation toolkit, so you will have to download that as well in order for this to work. Sorry.

Required Products Simulink
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
27 May 2006 Robert Meier

Well... after "MATUnit", "munit" and "Unit Testing Tools" another unit testing framework, which is not "unified" at all.

Tests are created with input / output vectors as well as one of three "comparators" and saved to a .mat-file. Then these .mat-files are sequently loaded to the workspace and the corresponding "component" is executed. This is error-prone, because the tests might influence each other, e.g. the component might read the workspace variables of a prior test, two tests might accidentally use the same .mat-file or even the component might overwrite the .mat-file of a test.

Furthermore there is no "assert", no concept like test method, test suite or the fixture, no way to check for expected exceptions, etc.

As I can't find the "model creation toolkit", the Simulink part isn't working at all.

Finally, there are already two (!) great testing frameworks for Matlab:
(1) MUnit by Brad Phelan
http://xtargets.com/cms/Tutorials/Matlab-Programming/MUnit-Matlab-Unit-Testing.html
(2) mlUnit by Thomas Dohmke
http://mlunit.sourceforge.net/

23 Dec 2011 Jens

Another unit and integration test framework for Simulink models is the commercial tool TPT at http://www.piketec.com/products/tpt.php

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
development environment Carl Kritzinger 22 Oct 2008 08:23:15
unti test Carl Kritzinger 22 Oct 2008 08:23:15
framework Carl Kritzinger 22 Oct 2008 08:23:15
tool Carl Kritzinger 22 Oct 2008 08:23:15
development Carl Kritzinger 22 Oct 2008 08:23:15
utilities Carl Kritzinger 22 Oct 2008 08:23:15
quality code Carl Kritzinger 22 Oct 2008 08:23:15
unit test Ryan Ollos 23 Sep 2009 16:22:12
xunit Ryan Ollos 23 Sep 2009 16:22:12

Contact us at files@mathworks.com