IBM
Contents Index Previous Next



Performing the Simulation


What You Will Learn

Single Stepping Test Cases

  1. In the TTCN Browser, select the test case TC_01.

Figure 60 : The test case TC_01 is selected in the Browser

This is the test case that you are going 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.

When you have reached the end of the test case, the bar that indicates the current line will change color. The color indicates the result of the execution of the test case. The colors are as follows:

Color Verdict

Green

PASS

Yellow

INCONC

Red

FAIL

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

Running Test Cases at Full Speed

  1. In the TTCN Browser, select the test case TC_01 again.
    This time, you are going to execute the test case at full speed.

  1. Click the Run Simulation button.
    The Table Editor is opened. The lines of TTCN code in the table will execute without pausing until the end of the test case is reached.

    • It is possible to stop the execution by clicking the Pause Simulation button

Running Test Batches

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

  1. In the TTCN Browser, select the test case TC_01 and TC_02.

Figure 61 : Selecting multiple test cases

  1. 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.

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. Set the cursor on line 3 in the test case TC_01.

  1. Press the Toggle Breakpoint button.
    This will set a breakpoint on line 3.
    The button will toggle the breakpoint status on the line that the cursor is placed on. If there is a breakpoint set on the line, it will be removed. If there is not a breakpoint there, one will be set.

  1. Select test case TC_01 in the Browser.
  2. 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.
  3. Set the cursor on line 3 in the test case TC_01.
  4. Press the Toggle Breakpoint button.
    This will remove the breakpoint from line 3.
  5. Press 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. Select test case TC_01 in the browser.
  2. 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.
  3. Click the Abort Simulation button.
    This aborts the execution of the test case for the SDL and TTCN Integrated Simulator.
  4. 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