|
Re: How to execute test cases with Linux command line [message #1796443 is a reply to message #1796343] |
Sat, 13 October 2018 06:35 |
|
Hi le tian,
there are two ways to start a parallel execution from the command line;
let's assume that you have built with Titan an executable binary myExecutableBinary
and you have a configuration file ConfigurationFile.cfg
I will assume that environment variables are set correctly (
see README.linux here https://github.com/eclipse/titan.core/blob/master/README.linux)
and I'm located and the same directory as the config file and the binary:
1) starting step by step ( this is more cumbersome but sheds some light on the architecture) :
start the main controller
./mctr_cli ConfigurationFile.cfg
this will display the port on which the main controller will be listening:
...Listening on IP address 127.0.0.1 and TCP port 46308
Create mtc:
cmtc
Waiting for HC to connect...
then start the host controller in a second console:
./myExecutableBinary 127.0.0.1 46308
(port has to match the above, and no config file here)
then start mtc in the first console:
2) use the ttcn3_start script:
ttcn3_start ./myExecutableBinary ConfigurationFile.cfg
I would recommend the latter as it is simpler.
For details, see Titan user guide , ch 4 Executing Test Suites.
Best regards
Elemer
|
|
|
Re: How to execute test cases with Linux command line [message #1796446 is a reply to message #1796343] |
Sat, 13 October 2018 07:42 |
Gyorgy Rethy Messages: 31 Registered: April 2015 |
Member |
|
|
Hi le tian,
Just one more hint, if you want to execute your test cases repeatedly:
Using the methods above, in the ConfigurationFile.cfg, the [EXECUTE] section have to list all testcases you want to execute, and then call ttcn3_start as many times as you want to repeat execution of your set of test cases.
Alternatively you may consider creating a new TTCN-3 module with a control {...} part in it, and define a for loop, the body of which is executing your test cases like:
for (var integer i=0;i<X;i:=i+1){
execute(MyTestcase1());
execute(MyTestcase2());
...
}
In this case you shall just execute this control part in you configuration part:
[EXECUTE]
MyControlModule.control
Some further advantages are, that you can control test case execution dynamically:
- add different guard timers to your test cases (you can also define a global guard timer in the .cfg file), the number of repetitions may be defined as a runtime parameter in the .cfg file or
- may even depend on the test case execution result -> you can save test case verdicts in a verdicttype variable and use it e.g. in if-else statements or increase/decrease/stop the number of cycles the test cases are executed in.
[Updated on: Sat, 13 October 2018 07:57] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03386 seconds