Reactive Systems logo
Reactis API V2020

API - Reactis: MATLAB Bindings - Reactis Tester

rsTesterCreate a test suite.
rsTesterStartInitiate the asynchronous creation of a test suite.
rsTesterStopStop running asynchronous test suite creation.
rsTesterCloseClose a Reactis Tester session.
rsTesterIsRunningTrue if test suite creation is still ongoing.
rsTesterGetNumStepsTakenGet test suite generation progress.
rsTesterGetProgressGet test suite generation progress.
rsTesterGetStatusGet test suite generation status.
rsTesterGetSuiteGet test suite after generation is finished.


rsTester

Create a test suite.

Syntax

suiteId = rsTester(modelFilename)
suiteId = rsTester(modelFilename,rsiFilename)
suiteId = rsTester(modelFilename,rsiFilename,suiteFilename)
suiteId = rsTester(modelFilename,rsiFilename,suiteFilename,extraParameters)
suiteId = rsTester(modelFilename,rsiFilename,suiteFilename,extraParameters,
                   reportFilename)
suiteId = rsTester(modelFilename,rsiFilename,suiteFilename,extraParameters,
                   reportFilename,reportConfig)

Description

suiteId = rsTester(modelFilename) creates a test suite for modelFilename using default settings. No .rsi file is used (even if one exists with the default name). This means model-specific settings will have default values and there are no input constraints or configuration variables.

suiteId = rsTester(modelFilename,rsiFilename) creates a test suite for modelFilename using settings from rsiFilename.

suiteId = rsTester(modelFilename,rsiFilename,suiteFilename) creates a test suite for modelFilename using settings from rsiFilename. The generated suite is saved in a file named suiteFilename.

suiteId = rsTester(modelFilename,rsiFilename,suiteFilename,extraParameters) Same as above, but you may pass additional parameters in the string argument extraParameters. The format of this string is described in Tester Additional Parameters.

suiteId = rsTester(modelFilename,rsiFilename,suiteFilename,extraParameters,reportFilename) Same as above, but also creates an HTML report about the generated test suite and saves the report in reportFilename.

suiteId = rsTester(modelFilename,rsiFilename,suiteFilename,extraParameters,reportFilename,reportConfig) Same as above, but you may also specify which information should be included in the HTML report using reportConfig, a data structure created by calling rsReportConfig.

Any parameter except modelFilename may be omitted by passing in an empty matrix instead.

The return value suiteId is a scalar integer valued double that identifies the generated test suite for use with other API functions. The test suite should be closed when no longer needed by calling rsSuiteClose. If no test suite file name was given in the rsTester call, the test suite should be saved by calling rsSuiteSave before closing it, otherwise the test data contained in the suite will be deleted. After the rsTester call finishes, coverage information may be obtained by calling rsGetCoverageMetrics.

Examples

suiteId = rsTester('cruise.slx','cruise.rsi','cruiseTestSuite.rst');
Generate a test suite for model cruise.slx using settings in cruise.rsi and save the resulting test suite to cruiseTestSuite.rst.

See Also

rsTesterStart, rsSuiteSave, rsSuiteClose, rsReportConfig, rsGetCoverageMetrics


rsTesterStart

Initiate the asynchronous creation of a test suite.

Syntax

testerId = rsTesterStart(modelFilename)
testerId = rsTesterStart(modelFilename,rsiFilename)
testerId = rsTesterStart(modelFilename,rsiFilename,suiteFilename)
testerId = rsTesterStart(modelFilename,rsiFilename,suiteFilename,extraParameters)
testerId = rsTesterStart(modelFilename,rsiFilename,suiteFilename,extraParameters,
                         reportFilename)
testerId = rsTesterStart(modelFilename,rsiFilename,suiteFilename,extraParameters,
                         reportFilename,reportConfig)

Description

The invocation of rsTesterStart works exactly as that of rsTester, but instead of only returning after test suite creation completes, rsTesterStart returns immediately and test suite creation continues asynchronously. The return value testerId is a scalar integer valued double that can be used to communicate with the test generation process using other API functions:

rsTesterIsRunning
Query if test generation is still running.
rsTesterGetProgress
Query test generation progress.
rsTesterGetSuite
Retrieve the newly generated test suite.
rsTesterStop
Stop the running test generation.
rsTesterClose
Close a Tester session and release memory.

Examples

>> tid = rsTesterStart('cruise.slx','cruise.rsi');
>> rsTesterIsRunning(tid)
ans = 
  1

>> rsTesterGetProgress(tid)
ans = 
  20.4000

>> rsTesterGetStatus(tid)
ans = 
  Targeted phase

See Also

rsTesterIsRunning, rsTesterGetProgress, rsTesterGetStatus, rsTesterGetSuite, rsTesterStop, rsTesterClose, rsTester, rsSuiteSave, rsSuiteClose, rsReportConfig


rsTesterStop

Stop running asynchronous test suite creation.

Syntax

rsTesterStop(testerId)

Description

rsTesterStop(testerId) stops test suite creation in the asynchronous tester session identified by testerId (initiated by rsTesterStart). The part of the test suite that was created before the call to rsTesterStop can be accessed by calling rsTesterGetSuite.

Examples

rsTesterStop(tid);

See Also

rsTesterStart, rsTesterIsRunning, rsTesterGetProgress rsTesterGetSuite, rsTesterClose


rsTesterClose

Close a Reactis Tester session.

Syntax

rsTesterClose(testerId)

Description

rsTesterClose(testerId) closes the asynchronous Tester session identified by testerId.

See Also

rsTesterStart


rsTesterIsRunning

True if test suite creation is still ongoing.

Syntax

running = rsTesterIsRunning(testerId)

Description

running = rsTesterIsRunning(testerId) returns 1 if the asynchronous Reactis Tester session identified by testerId (initiated by rsTesterStart) is still running and 0 if it has finished.

See Also

rsTesterStart, rsTesterGetStatus, rsTesterGetProgress rsTesterStop, rsTesterGetSuite, rsTesterClose


rsTesterGetNumStepsTaken

Get test suite generation progress.

Syntax

rsTesterGetNumStepsTaken(testerId)

Description

P = rsTesterGetNumStepsTaken(testerId) returns a number identifying how many steps Reactis Tester session testerId (initiated by rsTesterStart) has taken so far during its run.

See Also

rsTesterStart, rsTesterIsRunning, rsTesterGetStatus, rsTesterStop, rsTesterGetSuite, rsTesterClose, rsTesterGetProgress


rsTesterGetProgress

Get test suite generation progress.

Syntax

percentComplete = rsTesterGetProgress(testerId)

Description

percentComplete = rsTesterGetProgress(testerId) returns a scalar double in the range 0..100 to identify the percentage of test steps completed by the asynchronous Reactis Tester session identified by testerId (initiated by rsTesterStart).

Examples

>> tid = rsTesterStart('cruise.slx','cruise.rsi')
tid =
    1

>> rsTesterGetProgress(tid)
ans = 
  20.4000

See Also

rsTesterStart, rsTesterIsRunning, rsTesterGetStatus rsTesterStop, rsTesterGetSuite, rsTesterClose


rsTesterGetStatus

Get test suite generation status.

Syntax

status = rsTesterGetStatus(testerId)

Description

status = rsTesterGetStatus(testerId) returns a string identifying the current status of the asynchronous Tester Session identified by testerId (initiated by rsTesterStart).

Examples

>> tid = rsTesterStart('cruise.slx','cruise.rsi')
tid =
    1

>> status = rsTesterGetStatus(tid)
status = 
  Targeted phase

See Also

rsTesterStart, rsTesterIsRunning, rsTesterGetProgress rsTesterStop, rsTesterGetSuite, rsTesterClose


rsTesterGetSuite

Get test suite after generation is finished.

Syntax

suiteId = rsTesterGetSuite(testerId) 

Description

suiteId = rsTesterGetSuite(testerId) returns the test suite generated by a call to rsTesterStart. If test suite generation has not yet finished, suiteId will be an empty matrix. Otherwise, suiteId is a scalar integer valued double that identifies the test suite file for use with other API functions. When no longer needed, test suite suiteId should be closed by calling rsSuiteClose. If no test suite file name was given in the rsTesterStart call, the test suite should be saved by calling rsSuiteSave before closing it, otherwise the test data contained in the suite will be deleted.

See Also

rsTesterStart, rsTesterIsRunning, rsTesterGetStatus rsTesterStop, rsTesterGetSuite, rsTesterClose, rsSuiteClose, rsSuiteSave