Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit-testing framework for MATLAB [closed]

What are the unit-testing frameworks for MATLAB out there, and how do they compare? How should I choose one for our project? What are their pros and cons?

like image 861
lindelof Avatar asked Oct 21 '10 21:10

lindelof


People also ask

What is the purpose of a testing framework MATLAB?

The unit testing framework provides test tool authors the ability to extend test writing through custom constraints, diagnostics, fixtures, and plugins. For example, you can create a custom plugin and use it to extend the test runner when you run your script-based, function-based, or class-based unit tests.

What is unit testing in MATLAB?

Class-based unit tests give you access to the full unit testing framework functionality. For example, you can write parameterized tests, tag your tests, or use shared test fixtures. To get started, see Author Class-Based Unit Tests in MATLAB and Write Simple Test Case Using Classes.

What is MATLAB framework?

Each target must have a framework, which is a set of folders and files that implement the basic structure of a target. MathWorks® code generation software uses this framework to recognize the target and to tailor the code generation process.


2 Answers

The R2013a release of MATLAB includes a fully featured unit test framework

like image 120
Andy Avatar answered Oct 19 '22 01:10

Andy


I think the most popular framework for MATLAB is xUnit Test Framework available on File Exchange. Very flexible and well documented.

Some other unit-testing tools are listed here and here.

Another very recent and interesting File Exchange submission is Doctest. Not exactly unit-testing framework though, it works like doctest in Python. I haven't tried it yet, but looks very promising for simple tests embedded into function's help.

like image 11
yuk Avatar answered Oct 19 '22 00:10

yuk