Community Profile

photo

Andy Campbell


The MathWorks

46 total contributions since 2013

I am an engineer with the MathWorks who is very interested in test-focused software development methodologies.

My opinions are my own and do not reflect those of MathWorks.

Contact

Andy Campbell's Badges

Contributions in
View by

Answered
Is there a way share TestParameter and ClassSetupParameter properties of unit test class?
Hi Yvan, it sounds like you simply need access to the same parameters in a TestClassSetup as you do in one or more of your te...

4 days ago | 1

| accepted

Answered
How to save results of a Class-Based Unittest without ToFile Plugin?
As Sean alludes to in his comment, I think the best exxperience will be if you are able to upgrade to a newer release that has T...

16 days ago | 0

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 ...

1 month 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...

6 months ago | 2

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...

10 months 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...

10 months 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...

11 months 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...

1 year 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...

1 year 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 ...

1 year 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...

1 year 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...

1 year 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...

1 year 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...

1 year 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 ...

1 year 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 ...

1 year 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...

2 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...

2 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...

2 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...

2 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...

2 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. ...

2 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...

2 years ago | 1

| accepted

Solved


Test problem (times2)
This tests Cody's behavior when an assert is placed outside of a test cell

2 years ago

Problem


Test problem (times2)
This tests Cody's behavior when an assert is placed outside of a test cell

2 years ago | 0

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...

2 years ago | 1

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

2 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> ...

2 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...

2 years ago | 1

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

2 years ago | 0

| accepted

Load more