RSI Logo

Model-Based Testing and Validation with Reactis®

September 7, 2010
Reactis FAQs
spacer
Reactis Simulator
 
Spacer
• What is Reactis Simulator?
• How do I start Reactis Simulator?
• When I start Simulator on a large model it can take a while to initialize. Is this to be expected?
• How can I view the current values of data items during a simulation run?
• How do I determine which parts of a model are not exercised by a test suite?
• How do I set a breakpoint?
• Why are some menu items and buttons on the tool bar sometimes disabled?
• In the main window panel, when I right-click on an MC/DC target (Simulink logic block or Stateflow transition), why is the View Coverage Details menu item disabled?
• Why is there a blue rectangle in the main Reactis panel?
• I created a test suite from a model using Reactis, but when I run the tests within Reactis, the output values are different than those stored in the tests. Why is this?


 

What is Reactis Simulator?

Reactis Simulator enables users to visualize execution of Simulink/Stateflow models. Simulator's user interface is similar to those of traditional debuggers from programming languages: it enables users to execute their models step-by-step (or even block-by-block), as well as set breakpoints. Simulator can also:

  • step backwards through a simulation
  • enable controlled replay of tests generated by ReactisTester
  • present a graphical display of different coverage criteria
  • fine-tune Tester-generated test suites.



 

How do I start Reactis Simulator?

Load your model in Reactis and then click the green button in the tool bar.




 

When I start Simulator on a large model it can take a while to initialize. Is this to be expected?

Yes, when Simulator is invoked, the model needs to be initialized (including some interaction with MATLAB) before simulation can begin. Watch the bottom left corner of the Reactis Window for status messages during model initialization. Note that much of the initialization information is stored in a file (with a .mwi suffix), so subsequent invocations of Simulator will be quicker. The initialization must be repeated if the model is modified.




 

How can I view the current values of data items during a simulation run?

For any data item (Simulink block, signal or Stateflow variable), at any point during a simulation run, you can:

  • Hover over the data item in the diagram window. This will cause a pop-up to display the current value of the item.
  • Right-click on the data item and select Open Scope which will open a graph displaying the value.
  • right-click on the data item and select Add to Watched which will display in a table in the lower part of the simulator window.



 

How do I determine which parts of a model are not exercised by a test suite?

This can be done as follows:

  1. Load your model in Reactis.
  2. Start Simulator (click the green button in the tool bar).
  3. Load the test suite by selecting menu item Test Suite, Open...
  4. Select menu item Coverage, Show Details. Unexercised portions of the model will be highlighted in red. Since no simulation steps have occurred yet, all targets will be red.
  5. In the steps to pause entry box in the tool bar (the entry box that contains a number), enter 0. This is a shorthand to indicate that the entire test suite should execute.
  6. Click the fast simulation button (>>) to execute all tests.
  7. Upon completion only parts of the model not exercised by the tests will be highlighted in red.



 

How do I set a breakpoint?

Right-click on a Simulink block, Stateflow state, or Stateflow transition in the main panel and select Toggle Breakpoint. You can also right-click on a Simulink or Stateflow block in the model hierarchy display panel of the main Reactis window and select Toggle Breakpoint.




 

Why are some menu items and buttons on the tool bar sometimes disabled?

Reactis has two primary modes of operation. The current mode of operation depends on whether Simulator is enabled or disabled. Certain buttons are disabled in each of the modes. When Simulator is off, the buttons that control a simulation (play, fast forward, reverse step, ...) are not active. When Simulator is enabled, any buttons (and some menu items) related to modifying the .rsi file are disabled. In particular, all buttons related to editing Validator objectives are disabled.




 

In the main window panel, when I right-click on an MC/DC target (Simulink logic block or Stateflow transition), why is the View Coverage Details menu item disabled?

This menu item becomes enabled only when Simulator is enabled and the Coverage, Show Details menu item is selected.




 

Why is there a blue rectangle in the main Reactis panel?

This rectangle appears when a region has been selected for printing (this is done in the main Reactis panel by holding down the CTRL key, left-clicking and dragging). To remove the rectangle, select menu item File, Remove Print Region , or by pressing the Escape (ESC) key.




 

I created a test suite from a model using Reactis, but when I run the tests within Reactis, the output values are different than those stored in the tests. Why is this?

 

The probable explanation is that your model was modified after the tests were generated, but before they were run. In this case, feeding in the input values from the test might yield different responses from the model. To update a test suite so that the new model responses are recorded in the tests, load the model and test suite in Simulator and then select Test Suite, Update Outputs...

Another possible explanation for the differences is that the model contains an S-function that maintains its own state from one call to the next. (For example, the S-function might modify global or statically allocated variables.) During the test-generation process Reactis repeatedly restarts simulations from intermediate model configurations. In order to restore configurations for S-functions appropriately, Reactis must be able to extract any persistent state information the function might have. Reactis can do this if the S- function adheres to the constraints described in Chapter Preparing Models for Use with Reactis of the Reactis User's Guide and only uses storage allocated by mdlInitializeSizes() to store information between calls to the S-function.





Spacer