1 .******************************************************************************
2 .* Copyright (c) 2000-2014 Ericsson Telecom AB
3 .* All rights reserved. This program and the accompanying materials
4 .* are made available under the terms of the Eclipse Public License v1.0
5 .* which accompanies this distribution, and is available at
6 .* http://www.eclipse.org/legal/epl-v10.html
7 .******************************************************************************/
11 .* EDML webpage: http://cpi.ericsson.se/dwaxe/
12 .* EDML2PDF converter: http://dwaxe.ericsson.se/x2pdf
13 .* EDML user guide: http://www.lmc.ericsson.se/~lmcmarg/isit/edml_ug.html
15 .* Document header information
16 :docname.Test Description
17 :docno.xx/152 91-CRL 113 200/3 Uen
21 :prep.ETH/XZR Jeno Balasko
22 :appr.ETH/XZR (Elemer Lelik)
25 :title.Test description of the TTCN-3 config files
27 .*---------------------------------------------------------------------*
29 .*---------------------------------------------------------------------*
30 .*---------------------------------------------------------------------*
32 .*---------------------------------------------------------------------*
34 REV DATE PREPARED CHANGE
35 __________________________________________________
36 PA1 2013-03-01 ETHBAAT New document for TITAN CRL 113 200/3
39 .*---------------------------------------------------------------------*
41 .*---------------------------------------------------------------------*
42 The purpose of this Test Description is to define and describe the function
43 test activity for the listed functionality of the TTCN-3 executor including
44 the relevant configuration options and the configuration file parser as follows:
45 :li D='1.'Ordered Include
47 :nl.SA-1/x: Unknown object.
48 :p.The specification of the test cases can be found in this document.
49 .*---------------------------------------------------------------------*
51 .*---------------------------------------------------------------------*
52 .*---------------------------------------------------------------------*
54 .*---------------------------------------------------------------------*
55 No specific hardware requirement.
56 .*---------------------------------------------------------------------*
58 .*---------------------------------------------------------------------*
59 Tests shall be carried out on the following platforms:
61 :li D='1.'.Solaris 8 (Sun OS 5.8) (gcc 3.0.4)
62 :li D='2.'.SUSE Linux Enterprise server 8 (2.4.19-4GB) (gcc 3.2)
63 :li D='3.'.CYGWIN_NT-5.0 (Cygwin DLL: 1.5.12) on Windows 2000 (gcc 3.3.3)
65 .*---------------------------------------------------------------------*
67 .*---------------------------------------------------------------------*
68 The test environment had been setup in CVS. The tester program is stored in:
69 :nl.TTCNv3/function_test/Tools/SAtester.pl
70 :nl.Test cases are stored with extension .script in the directory:
71 :nl.TTCNv3/function_test/Semantic_Analyser/
72 .*---------------------------------------------------------------------*
74 .*---------------------------------------------------------------------*
75 Install proper TITAN binaries on the used platforms and make sure that
76 your environment settings are correct:
78 :li D='1.'.TTCN3_DIR is set
79 :li D='2.'.$TTCN3_DIR/bin is added to the PATH variable
80 :li D='3.'.$TTCN3_DIR/lib is added to the LD_LIBRARY_PATH variable
81 :li D='4.'.Perl 5.6.0 or higher is available on the platform
82 :li D='5.'.Create a symlink to your Perl binary into the directory where the
83 test cases are stored:
84 :nl.ln -s <your Perl> perl
86 .*---------------------------------------------------------------------*
88 .*---------------------------------------------------------------------*
89 A tester program had been written in Perl especially for the Semantic Analyser
90 tests. For the list of command line parameters, type 'SAtester.pl -help', for the
91 complete documentation, type 'SAtester.pl -doc'.
92 :p.Test cases are specified in the Test Description documents in EDML format.
93 The tester program parses these files and generates the TTCN-3/ASN.1 modules, then
94 calls the compiler to compile them. The result printout is then matched against
95 different patterns to be able to set the verdict. Test cases contain not only
96 the source modules, but the patterns as well.
97 :p.The tester program allows one-by-one execution of test cases and batched
99 :p.NOTE: the tester program requires Perl 5.6.0 or higher.
100 .*---------------------------------------------------------------------*
102 .*---------------------------------------------------------------------*
103 Ref [1]: SA-1/x: Unknown object
104 :nl.Explanation: all unknown objects shall be detected by SA.
105 .*---------------------------------------------------------------------*
107 .*---------------------------------------------------------------------*
108 Test cases are based on TTCN-3 BNF according to the followings:
110 :li D='1.'.For each 'basic' definition a complete coverage is done (e.g. for
111 expressions, assignments, etc.). 'Basic' means that the definition is
112 used in several places.
113 :li D='2.'.For each definition a complete coverage is done, except for basic
114 definitions, in which case only 1-2 examples are covered, not the
115 whole basic definition. This is to avoid testing all possible subcases
116 for all possible places it may appear.
117 :nl.NOTE: a complete coverage means that all occurances are tested where
118 the specific definition may occur. This is however not complete. Only
119 one occurance is tested for each construct.
120 :li D='3.'.Test case names are contsructed following the path in the BNF in TTCN-3
121 and following the possible notations/subtyping in ASN.1.
123 .*---------------------------------------------------------------------*
125 .*---------------------------------------------------------------------*
126 The following structures are not covered:
128 :li D='-'.sub-structures that causes parse error due to limited support of that
129 part of the language (e.g. interleave construct)
131 .*---------------------------------------------------------------------*
133 .*---------------------------------------------------------------------*
134 .*---------------------------------------------------------------------*
135 :h2.Ordered include - Positive tests
136 .*---------------------------------------------------------------------*
137 .*---------------------------------------------------------------------*
138 :h3. Positive Testcase - single mode
139 .*---------------------------------------------------------------------*
142 <TC - Positive Testcase - single mode>
146 <MODULE TTCN Temp Temp.ttcn>
150 charstring tsp_c :="tsp_c_default";
151 charstring tsp_c0:="tsp_c_default0";
152 charstring tsp_c1:="tsp_c_default1";
153 charstring tsp_c2:="tsp_c_default2";
156 type component MyComp {}
158 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
159 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
161 with { extension "transparent" }
163 testcase tc_1() runs on MyComp{
164 f_setverdict_C(tsp_c,"0");
165 f_setverdict_C(tsp_c0,"0");
166 f_setverdict_C(tsp_c1,"1");
167 f_setverdict_C(tsp_c2,"2");
170 control{ execute(tc_1()); }
178 Overall verdict: pass
181 <MODULE CFG oi1_before1 oi1_before1.cfg>
192 <MODULE CFG oi2 oi2.cfg>
201 <MODULE CFG oi oi.cfg>
203 LogSourceInfo := Stack
204 ConsoleMask:= LOG_ALL
221 .*---------------------------------------------------------------------*
222 :h3. Positive Testcase - parallel mode
223 .*---------------------------------------------------------------------*
226 <TC - Positive Testcase - parallel mode>
230 <MODULE TTCN Temp Temp.ttcn>
234 charstring tsp_c :="tsp_c_default";
235 charstring tsp_c0:="tsp_c_default0";
236 charstring tsp_c1:="tsp_c_default1";
237 charstring tsp_c2:="tsp_c_default2";
240 type component MyComp {}
242 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
243 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
245 with { extension "transparent" }
247 testcase tc_1() runs on MyComp{
248 f_setverdict_C(tsp_c,"0");
249 f_setverdict_C(tsp_c0,"0");
250 f_setverdict_C(tsp_c1,"1");
251 f_setverdict_C(tsp_c2,"2");
254 control{ execute(tc_1()); }
261 <MODULE CFG oi1_before1 oi1_before1.cfg>
272 <MODULE CFG oi2 oi2.cfg>
280 <MODULE CFG oi oi.cfg>
282 LogSourceInfo := Stack
283 ConsoleMask:= LOG_ALL
298 Overall verdict: pass
307 .*---------------------------------------------------------------------*
308 :h3. Ordered include - double import - single mode
309 .*---------------------------------------------------------------------*
312 <TC - Ordered include - double import - single mode>
316 <MODULE TTCN Temp Temp.ttcn>
320 charstring tsp_c :="tsp_c_default";
321 charstring tsp_c0:="tsp_c_default0";
322 charstring tsp_c1:="tsp_c_default1";
323 charstring tsp_c2:="tsp_c_default2";
326 type component MyComp {}
328 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
329 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
331 with { extension "transparent" }
333 testcase tc_1() runs on MyComp{
334 f_setverdict_C(tsp_c,"0");
335 f_setverdict_C(tsp_c0,"0");
336 f_setverdict_C(tsp_c1,"1");
337 f_setverdict_C(tsp_c2,"2");
340 control{ execute(tc_1()); }
348 Overall verdict: pass
351 <MODULE CFG oi1_before1 oi1_before1.cfg>
360 <MODULE CFG oi2 oi2.cfg>
368 <MODULE CFG oi oi.cfg>
370 LogSourceInfo := Stack
371 ConsoleMask:= LOG_ALL
389 .*---------------------------------------------------------------------*
390 :h3. Ordered include - double import - parallel mode
391 .*---------------------------------------------------------------------*
394 <TC - Ordered include - double import - parallel mode>
398 <MODULE TTCN Temp Temp.ttcn>
402 charstring tsp_c :="tsp_c_default";
403 charstring tsp_c0:="tsp_c_default0";
404 charstring tsp_c1:="tsp_c_default1";
405 charstring tsp_c2:="tsp_c_default2";
408 type component MyComp {}
410 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
411 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
413 with { extension "transparent" }
415 testcase tc_1() runs on MyComp{
416 f_setverdict_C(tsp_c,"0");
417 f_setverdict_C(tsp_c0,"0");
418 f_setverdict_C(tsp_c1,"1");
419 f_setverdict_C(tsp_c2,"2");
422 control{ execute(tc_1()); }
429 <MODULE CFG oi1_before1 oi1_before1.cfg>
437 <MODULE CFG oi2 oi2.cfg>
443 <MODULE CFG oi oi.cfg>
445 LogSourceInfo := Stack
446 ConsoleMask:= LOG_ALL
461 <RESULT IF_FAIL COUNT 1>
462 Overall verdict: pass
470 .*---------------------------------------------------------------------*
471 :h2.Ordered include - Negative tests
472 .*---------------------------------------------------------------------*
473 .*---------------------------------------------------------------------*
474 :h3. Cyclic ordered import - single mode
475 .*---------------------------------------------------------------------*
478 <TC - Cyclic ordered import - single mode>
482 <MODULE TTCN Temp Temp.ttcn>
486 charstring tsp_c :="tsp_c_default";
489 type component MyComp {}
491 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
492 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
494 with { extension "transparent" }
496 testcase tc_1() runs on MyComp{
497 f_setverdict_C(tsp_c,"0");
500 control{ execute(tc_1()); }
506 <MODULE CFG oi1 oi1.cfg>
516 <MODULE CFG oi2 oi2.cfg>
526 <MODULE CFG oi oi.cfg>
528 LogSourceInfo := Stack
529 ConsoleMask:= LOG_ALL
542 Parse error while pre-processing configuration file.*Circular import chain detected:
549 .*---------------------------------------------------------------------*
550 :h3. Cyclic ordered import - parallel mode
551 .*---------------------------------------------------------------------*
554 <TC - Cyclic ordered import - parallel mode>
558 <MODULE TTCN Temp Temp.ttcn>
562 charstring tsp_c :="tsp_c_default";
565 type component MyComp {}
567 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
568 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
570 with { extension "transparent" }
572 testcase tc_1() runs on MyComp{
573 f_setverdict_C(tsp_c,"0");
576 control{ execute(tc_1()); }
582 <MODULE CFG oi1_before1 oi1_before1.cfg>
592 <MODULE CFG oi2 oi2.cfg>
602 <MODULE CFG oi oi.cfg>
604 LogSourceInfo := Stack
605 ConsoleMask:= LOG_ALL
618 Parse error while pre-processing configuration file.*Circular import chain detected:
625 .*---------------------------------------------------------------------*
626 :h3. Ordered import of empty filename - single mode
627 .*---------------------------------------------------------------------*
630 <TC - Ordered import of empty filename - single mode>
634 <MODULE TTCN Temp Temp.ttcn>
638 charstring tsp_c :="tsp_c_default";
641 type component MyComp {}
643 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
644 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
646 with { extension "transparent" }
648 testcase tc_1() runs on MyComp{
649 f_setverdict_C(tsp_c,"0");
652 control{ execute(tc_1()); }
658 <MODULE CFG oi1 oi1.cfg>
668 <MODULE CFG oi2 oi2.cfg>
678 <MODULE CFG oi oi.cfg>
680 LogSourceInfo := Stack
681 ConsoleMask:= LOG_ALL
694 Parse error while pre-processing configuration file.*Empty file name
701 .*---------------------------------------------------------------------*
702 :h3. Ordered import of empty filename - parallel mode
703 .*---------------------------------------------------------------------*
706 <TC - Ordered import of empty filename - parallel mode>
710 <MODULE TTCN Temp Temp.ttcn>
714 charstring tsp_c :="tsp_c_default";
717 type component MyComp {}
719 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
720 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
722 with { extension "transparent" }
724 testcase tc_1() runs on MyComp{
725 f_setverdict_C(tsp_c,"0"); //pass
728 control{ execute(tc_1()); }
734 <MODULE CFG oi1_before1 oi1_before1.cfg>
744 <MODULE CFG oi2 oi2.cfg>
754 <MODULE CFG oi oi.cfg>
756 LogSourceInfo := Stack
757 ConsoleMask:= LOG_ALL
770 Parse error while pre-processing configuration file.*Empty file name
777 .*---------------------------------------------------------------------*
778 :h3. Ordered import of not existing filename - single mode
779 .*---------------------------------------------------------------------*
782 <TC - Ordered import of not existing filename - single mode>
786 <MODULE TTCN Temp Temp.ttcn>
790 charstring tsp_c :="tsp_c_default";
793 type component MyComp {}
795 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
796 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
798 with { extension "transparent" }
800 testcase tc_1() runs on MyComp{
801 f_setverdict_C(tsp_c,"0");
804 control{ execute(tc_1()); }
810 <MODULE CFG oi1 oi1.cfg>
820 <MODULE CFG oi2 oi2.cfg>
830 <MODULE CFG oi oi.cfg>
832 LogSourceInfo := Stack
833 ConsoleMask:= LOG_ALL
846 Parse error while pre-processing configuration file.*File not found:.*Config_Parser\/Subidubi.cfg
849 Parse error in configuration file .*Config_Parser\/oi2.cfg.*File not found:.*Config_Parser\/Subidubi.cfg
857 .*---------------------------------------------------------------------*
858 :h3. Ordered import of not existing filename - parallel mode
859 .*---------------------------------------------------------------------*
862 <TC - Ordered import of not existing filename - parallel mode>
866 <MODULE TTCN Temp Temp.ttcn>
870 charstring tsp_c :="tsp_c_default";
873 type component MyComp {}
875 function f_setverdict_C(in charstring pl_value,in charstring pl_expected){
876 if(pl_value == pl_expected) { setverdict(pass) } else{ setverdict(fail,match(pl_value,pl_expected)) };
878 with { extension "transparent" }
880 testcase tc_1() runs on MyComp{
881 f_setverdict_C(tsp_c,"0"); //pass
884 control{ execute(tc_1()); }
890 <MODULE CFG oi1_before1 oi1_before1.cfg>
900 <MODULE CFG oi2 oi2.cfg>
910 <MODULE CFG oi oi.cfg>
912 LogSourceInfo := Stack
913 ConsoleMask:= LOG_ALL
926 Parse error while pre-processing configuration file.*File not found:.*Config_Parser\/Subidubi.cfg
929 Parse error in configuration file .*Config_Parser\/oi2.cfg.*File not found:.*Config_Parser\/Subidubi.cfg
935 *---------------------------------------------------------------------*
937 .*---------------------------------------------------------------------*
939 :li D='ASN.1'.Abstract Syntax Notation 1
940 :li D='EDML'.Ericsson Document Markup Language
941 :li D='SA'.Semantic Analyser
942 :li D='TTCN-3'.Test and Test Control Notation version 3
945 .*---------------------------------------------------------------------*
947 .*---------------------------------------------------------------------*
949 :li D='[1]'.ETH/RZ-2005:0120 Uen
950 :nl.Requirement Specification for the TITAN TTCN-3 Executor
951 :li D='[2]'.1/174 02-FCPCA 101 42 Uen
952 :nl.Statement of Compliance for TITAN project
953 :li D='[3]'.ETSI ES 201 873-1, v3.0.0 Mockup v1 (2004-03):
954 :nl.Testing and Test Control Notation version 3.,
955 :nl.Part 1: TTCN-3 Core Language
958 .*---------------------------------------------------------------------*
960 .*---------------------------------------------------------------------*
962 :li D='TITAN'.Ericsson's TTCN-3 Test Environment