Running matlab code inside of plugin

We have a script written in Matlab, and we would like to be able to run the code inside an OpenTAP plugin. The idea would to be able to extend the test automation interface, prompt user input, and as a part of a test step, publish the results of the script using a result listener.

@brennen_direnzo

1 Like

It is fairly easy to compile MATLAB code as a DLL that you can then wrap in a Test Step:
https://www.mathworks.com/help/compiler_sdk/gs/create-a-dotnet-application-with-matlab-code.html

@david-wsd I know you looked into calling MATLAB from OpenTAP in the past. Is this the general approach you took? Any other tips?

1 Like

Hi @brennen_direnzo, yes, the first part of that article (Create .NET Assembly Using Library Compiler App) is the approach I use. It requires purchasing a Matlab Compiler license, and installing matlab runtime on the OpenTAP PC. We have a number of OpenTAP test steps that call matlab functions in this manner, passing input arguments and getting outputs.

1 Like