OpenTTCN/Training/TTCN-3 Basics/Exercises/1.4
From OpenTTCN
Exercise 1.4: Running test cases
After previous three exercises we have a running OpenTTCN server, an existing testion session called "MySession", and two TTCN-3 modules loaded into that testing session. We are now ready to execute test cases.
Goal: In this exercise we are learning how to execute test cases from TTCN-3 modules loaded into a testing session.
Step 1: TTCN-3 modules are loaded to a testing session
In the first exercise you have started OpenTTCN server and the server should be already running. If you don't have OpenTTCN server running, you need to start it now.
- Hint: ot start.
In the second exercise you have created a testing session with name "MySession". If you don't have "MySession" testing session, you need to create it now.
- Hint: session create.
In the third exercise you have loaded two TTCN-3 modules into "MySession" testing session. If you haven't loaded "MainModule" and "TestCases" modules into "MySession" testing session, you need to create it now.
- Hint: importer3 load.
Step 2: Check available tester command options
Type "tester" (and press return) in the command prompt and the tester command displays you all available command options.
Step 3: Run one test case
Using information that you acquired during Step 2, run one test case with name "TC_MyTest1". Compare the log produced by this test case with the test case itself.
Step 4: Run all available test cases
Using information that you acquired during Step 2, run all test cases available.
Step 5: Explore tester run options
Using information that you acquired during Step 2, explore various options of tester run command when running "TC_receive_2" test case from "Demo3" example you can find from: C:\Program Files\OpenTTCN\Tester3\testing\Demo3 directory.
- Hints:
cd C:\Program Files\OpenTTCN\Tester3\testing\Demo3 upload startif session list tester run ...
Explore at least the following options and check the longer form of these options using information that you acquired during Step 2:
- -q
- -i
- -m
- -f
- -l
Summary
Good! You have just completed your fourth OpenTTCN exercise. During this exercise you learned how to run test cases from modules that you have previously loaded into testing session. You have seen again that running OpenTTCN commands without arguments displays you a list of available command options. You are now ready to proceed to the next exercise to learn how to write, load, and run a test case by yourself.
