MATLAB Runtime Server    

Testing While Emulating the Runtime Server

The procedure for testing the MATLAB portion of a MATLAB runtime engine application while commercial MATLAB emulates the Runtime Server is slightly different from that for a MATLAB runtime GUI application. This section discusses Runtime Server emulation on PC and UNIX platforms, as well as testing with the Runtime Server variant. See Troubleshooting, in the earlier section Testing While Emulating the Runtime Server (GUI), if the application does not run as expected.

Moving P-Files to Final Locations

If you store your source M-files outside of the toolbox directory, then at some point during your testing you should move the corresponding P-files to their final destinations under toolbox. Then use rehash toolboxreset to register the changes.

Each time you change the source M-files, remember to delete, regenerate, and move the P-files to their toolbox destination. Again, use rehash toolboxreset as necessary to register the changes to toolbox subdirectories.

Emulating the Runtime Server Using ActiveX Automation (PC)

Type the following two commands at the MATLAB prompt to start emulating the Runtime Server and to set the runtime path.

Then launch the application by starting up the front-end executable file. The application now uses the running MATLAB as its Automation server, and you can test the program by making the appropriate call to the runtime application.

To execute M-files and debug your functions, tell MATLAB to stop emulating the Runtime Server by typing

Emulating the Runtime Server Using Engine API Commands

If your application is based on the MATLAB Engine API, then Runtime Server emulation enables you to test only the back-end MATLAB portion of your application. To test the front and back ends together, MATLAB must execute as a Runtime Server variant, as described in Testing with the Runtime Server Variant.

To test the MATLAB portion while MATLAB emulates the Runtime Server, follow these steps:

  1. Type
  1. runtime on

    at the MATLAB prompt to start emulating the Runtime Server.

  1. Type
  1. matlabrt

    to set the runtime path, perform other startup tasks, and invoke your application P-files.

  1. To execute M-files and debug your functions, first turn off Runtime Server emulation by typing
  1. runtime off

    Then use commercial MATLAB as you ordinarily would.


  Compiling the Application Testing with the Runtime Server Variant