Answered
Folder structure for matlab unit tests
This is something that is highly subjective and many people will have many varied opinions. I have found over the years that no ...

7 years ago | 1

Answered
rmdir frequently fails with the 'MATLAB:RMDIR:SomeDirectoriesNotRemoved' error
Have you tried using the <http://www.mathworks.com/help/matlab/ref/matlab.unittest.fixtures.temporaryfolderfixture-class.html Te...

8 years ago | 3

Answered
Creating an array of structs and using the field directly?
Do you need it to be a one liner? If not: s = [struct('field',1) struct('field',2)]; a = {s.field}; Otherwise you...

8 years ago | 1

Answered
matlab.unittest.testcase not found on path
This does seem like an installation problem. A couple things to try: 1. Look for TestCase >> which -all matlab.unittest.T...

8 years ago | 0

Answered
Execution rules of SharedTestFixtures for complex dependencies
Hi Ilya, Great question! First the guiding principle is that shared test fixtures first value robustness/correctness, and sec...

8 years ago | 1

| accepted

Answered
No unittest package found in Matlab 2015b
You should have the relevant code, although it's possible t moved locations. Type >> what runtests to see where th...

8 years ago | 0

| accepted

Answered
Can anyone explain the absence of functions when testing
When you create a test suite "fromFile" or "fromFolder", the test runner changes to that folder and adds it to the path when run...

8 years ago | 1

| accepted

Answered
Show complete error table using verifyEqual (from Unit Testing)
There is currently no way to show all the indices in the failure table when the array has more than 50 failing indices. I am ...

8 years ago | 0

| accepted

Answered
Running a Unit Test for multiple functions
Hi Connor, Definitely look into Cody Coursework, but for now it only supports script-based testing, which does not have as ma...

8 years ago | 1

Answered
Running a Unit Test for a script
Hi Conner, You can can just call the script from within a test function or method. Then the variables that were created in th...

8 years ago | 2

Answered
Problems using type double in fatalAssertEqual function (unit testing)
Hello, Learning about unit testing is definitely a good thing, and I'd be happy to help as you encounter questions. The us...

9 years ago | 0

Answered
Script-Based Unit Testing Problem (from MathWorks example)
Hello, The Script based testing interface was added in R2014b, and in that release the shared variable section was not suppor...

9 years ago | 0

| accepted

Answered
Problem Displaying Unit Test Results
Hi Christopher, The table conversion method from TestResult was added in release R2014b, so it just seems you don't have the ...

9 years ago | 0

| accepted

Answered
How do I teardown fixture while using a TestCase obj in interactive mode?
Hello Kouichi, Yes applyFixture ties the fixture teardown step to the lifecycle of the testCase upon which it is applied, so ...

9 years ago | 0

Answered
error stack trace visible with verifyError
Hi Hans, I think that there is still some key ingredient missing. I wrote the following stub for LoadFaultTable: funct...

9 years ago | 0

| accepted

Answered
How can I assign the Test Diagnostic provided by the Unit Testing framework in the Command Window to a variable
Hi Malek, You can get programmatic access to this information by creating and installing a |TestRunnerPlugin| for the test ru...

9 years ago | 0

| accepted

Answered
In Matlab unittesting how to modify a property after test suite is created
If you do not yet have R2014b, there are a few things you can do to at least get something close to this behavior. One thing...

9 years ago | 0

Answered
In Matlab unittesting how to modify a property after test suite is created
Hello Nadjib, The reason you can't change the property like you were trying to do is becase |matlab.unittest.Test| and |mat...

9 years ago | 2

| accepted

Answered
How can I get the function handle to the currently running function without relying upon the current path settings?
One approach that you can take is to exploit the fact that the local functions have higher precedence than the functions that ma...

9 years ago | 0

| accepted

Answered
How to create a plugin that stores the exception from a failing test
Hi Daniel, There is currently no plugin included with the framework that directly stores this information on its properties. ...

10 years ago | 2

Answered
How to use Matlab's unit test framework component verifyError to verify an error from a MEX function
Hi Vincent, The verifyError function requires that the error thrown is an <http://www.mathworks.com/help/matlab/matlab_prog/c...

10 years ago | 3

| accepted

Answered
How can I integrate the MATLAB testing framework with Team Foundation Server
***** UPDATE ***** Another possibility you can try is setting up your own Jenkins Server (at least for simple cases this is n...

10 years ago | 1

Answered
How to synchronize multiple timeseries
I have answered this here: http://stackoverflow.com/questions/16364127/synchronize-multiple-timeseries

10 years ago | 0

Answered
xml output for matlab.unittest results
In R2014a, MATLAB has <http://www.mathworks.com/help/matlab/ref/matlab.unittest.plugins.tapplugin-class.html included a plugin> ...

10 years ago | 0

Answered
How do execute a GUI's callback functions from the command line
Hello Tolulope, What you ask for is something that is not currently available in MATLAB, and I have created an enhancement re...

10 years ago | 1

Answered
Suppress figures in unit tests
Hi Gordon, This seems to work for me: classdef KillFigureTest < matlab.unittest.TestCase properties ...

10 years ago | 0

| accepted

Answered
is there a code to open and run all m files in a folder?
To expand on per's answer, in R2014a you can do this using parameterized tests: classdef TestAllFiles < matlab.unittest.T...

10 years ago | 1

Answered
Why are unittests running twice?
Hi Reinhold, It's tough to tell precisely what is going on here. My first thought is that perhaps you have two copies of your...

10 years ago | 0

| accepted

Answered
Fail Reasons exportable in the UnitTest-Framework?
This is related to your other question <http://www.mathworks.com/matlabcentral/answers/108586-will-there-be-a-pdf-documentation-...

10 years ago | 1

Answered
Matlab Unit Testing Framework supporting Simulink?
Hello Till, The MATLAB Unit Test framework is written for use with the MATLAB language. However, using Simulink commands like...

10 years ago | 1

Load more