IBM
Contents Index Previous Next



Performing the Simulation


What You Will Learn

Single Stepping Test Cases

  1. In the SDL and TTCN Integrated Simulator window, select the test case TC_01 and then click the right arrow that appears.
    This selects the test case that we will execute by adding it to the Selected box:

Figure 64 : Selecting a test case to execute

  1. Click the Step Simulation button
    Each time you click this button, the SDL and TTCN Integrated Simulator executes one step of TTCN code.

A Table Editor is opened. In the first line of TTCN code, there is a colored bar.

Note:

This bar indicates which line will be executed the next time you click the Step Simulation button.

  1. Enter the command go-forever in the SDL simulator window.
    The SDL simulator is now executing and it is possible to perform a simulation.
  2. Click the Step Simulation button repeatedly until you reach the end of the test case.

Running Test Cases at Full Speed

  1. In the SDL and TTCN Integrated Simulator window, make sure that the test case TC_01 is still in the Selected box. If it is not, select the test case again and click the right arrow.

Note:

If the test case already is in the Selected box, you do not have to select it again. If you select it again, you are actually telling the SDL and TTCN Integrated Simulator that you want to execute the test case twice.

  1. Click the Run Simulation button.
    The simulator now starts executing lines of TTCN code without pausing. This will continue until the end of the test case is reached or until you click the Pause Simulation button.
    As you can see, the colored bar in the Table Editor will change rapidly.

At this point the SDL simulator is running at full speed. This is normal and you can safely ignore the SDL simulator. The cause of this is a timer in the simulated SDL system that fires repeatedly while waiting for input from the SDL and TTCN Integrated Simulator.

Running Test Batches

It is also possible to execute more than one test case or test group.

  1. In the SDL and TTCN Integrated Simulator window, deselect the test case TC_01 in the Available box. You do this by clicking on the test case.
  2. Select the test case TC_02 and click the right arrow. The test case is added to the Selected box after TC_01.
    You can perform this operation with as many test cases as you wish. You can add them in any order. The Selected box tells you in what order the test cases will be executed.
  3. Press the Run Simulation button.
    This will cause the SDL and TTCN Integrated Simulator to execute all the selected test cases in turn without pausing anywhere. Another Table Editor is opened for the second test case.

Note:

This requires an SDL Suite system that always ends in a state from where you can execute a new test case. The SDL Suite system may not require any manual resetting between test cases.

Toggling Breakpoints

  1. Make sure that the SDL and TTCN Integrated Simulator window is active and press <Ctrl+B>.
    This will open the Breakpoints window. In this window you can add and delete breakpoints.
  2. Select Add from the Edit menu.
    This adds an empty breakpoint definition to the breakpoint editor.
  3. Click in the edit field at the bottom of the Breakpoints window and type in TC_01 3 followed by <Return>.

Figure 65 : A breakpoint in the Breakpoints window

  1. Select Save from the File menu.
  2. Type in a filename with the extension .ttb and select OK.
    This will set a breakpoint on line 3.
  3. In the simulator window, make sure that only the test case TC_01 is selected.
  4. Press the Run Simulation button.
    The SDL and TTCN Integrated Simulator will run without pausing between lines of TTCN code. When it reaches the line where the breakpoint was set, it will stop, as you can see in the Table Editor.
  5. Select the breakpoint line we just added in the Breakpoints window.
  6. Select Delete from the Edit menu.
    This will remove the breakpoint from line 3.
  7. Select Save from the File menu.
  8. Select Close from the File menu.
  9. Click the Run Simulation button.
    The simulator now continues to run until it reaches the end of the test case.

Ending a Simulation

It is possible to end a simulation in the middle of an execution

  1. Click the Step Simulation button twice.
    This will place the current line on line 2 in the test case.
    You now realize that the execution was a mistake and you want to abort it.

  1. Click the Abort Simulation button.
    This aborts the execution of the test case for the SDL and TTCN Integrated Simulator.

  1. In the SDL simulator window, select Restart in the File menu.
    This restarts the SDL simulator. This step is necessary because otherwise the SDL Simulator and the SDL and TTCN Integrated Simulator would be out of sync.
    To continue co-simulation, you will need to enter the command start-itex in the SDL simulator, start running the test in the SDL and TTCN Integrated Simulator, and then enter the command go-forever in the SDL simulator.

http://www.ibm.com/rational
Contents Index Previous Next