Main Content

remove

Class: sltest.testmanager.TestInput
Package: sltest.testmanager

Remove test input

Syntax

remove

Description

remove removes the test input from a test case. The test input object is empty after a call to this function.

Input Arguments

expand all

The test input that you want to remove, specified as a sltest.testmanager.TestInput object.

Examples

expand all

Remove an Excel test input sheet

Load Example Model, Create New Test File, and Get Suites and Cases

open_system('sltestExcelExample');
tf = sltest.testmanager.TestFile('input_test_file.mldatx');
ts = getTestSuites(tf);
tc = getTestCases(ts);

Add the Model as the System Under Test

setProperty(tc,'Model','sltestExcelExample');

Add Excel Data to Inputs Section

excelfile = 'sltestExampleInputs.xlsx';
input = addInput(tc,excelfile);

Map the First Input Signal By Block Name

map(input(1),0);

Remove the Second Input

remove(input(2));
Introduced in R2015b