Model Requirements for Test Harness Generation

The automatic test generation requires that the model contain root-level Inports. If it does not, you will get an error message and a test harness will not be created. The following conditions apply to the Inports:

  • Model must contain root-level Inports.

  • The model's root-level Inports must have scalar dimensions. If any contain non-scalar dimensions, you will get an error.

  • The model's root-level Inports must use a supported datatype. If any use an unsupported datatype, you will get an error. Supported datatypes include double, single, int8, uint8, int16, uint16, int32, uint32, and logical.

The test file name and folder location must be writable in order for the test to be created (step 2 in the next section). If it is not, you will get an error. Choose another name or location that is writable.

The model must be able to be compiled. If it fails to compile (using the Update Diagram button in Simulink), you will get an error.

Was this topic helpful?