Changes between Initial Version and Version 1 of Documentation/T3Q/Quality-Checks/Modularization-Containment


Ignore:
Timestamp:
06/03/10 15:59:46 (14 years ago)
Author:
zeiss
Comment:

Importing pages from "/var/lib/svn/trac/etsicheck2" using WikiImport plugin.

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/T3Q/Quality-Checks/Modularization-Containment

    v1 v1  
     1=== Test Suite Modularization: Module Containment === 
     2 
     3Modules, whose identifiers contain any of the following substrings, shall contain only certain definition types, permissible for the particular type of module. These substrings will be referred to as "module restrictions" in the following, to establish a unified terminology and simplify the descriptions. All module restrictions are case-sensitive. The configuration entries are following the schema "check{!ModuleRestriction}!ModuleContainmentCheck", where "!ModuleRestriction" is to be substituted with the particular substring. Apart from the permissible definition types, all modules allow the presence of import and group definitions. The output for the quality checks indicates the location/scope of the definition (starting line - end line) violating the particular constraints and the type of module restriction that has been recognized and applied (based on the substring that has been found in the module name). Note that, if a module name contains multiple restrictions, all the checks will be applied individually. This means that a "!TypesAndValuesAndTemplates" module will first be checked for the permissible definition types for a "!TypesAndValues" module and throw a warning on any other definition (be it a definition of the permissible definitions for a "!Template" module), and then the other way around for the permissible definitions in a "!Templates" module. 
     4 
     5Note that control part definitions are allowed in all the following module containment checks. This may be subject to changes in the future (restricted to the "!TestControl" modules only). 
     6 
     7The details for the individual module restrictions are outlined below. 
     8 
     9==== !TypesAndValues Module Must Contain Only Type and Constant Definitions ==== 
     10 - '''Symbolic Name in XML Configuration''': checkTypesAndValuesModuleContainmentCheck 
     11 - '''Dependant Tags in XML Configuration''': - 
     12 
     13Any module that contains the substring ''!TypesAndValues'' in its name will be analyzed. Only type and constant definitions are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. The first three definitions are type and constant definitions. However, templates, testcases, and functions must not be present in such a module. Thus, these last three module definitions will be reported as not of the permissible types. 
     14 
     15'''Example:''' 
     16 
     17[[Include(source:trunk/t3q-examples/checkTypesAndValuesModuleContainmentCheck/checkTypesAndValuesModuleContainmentCheckBad.ttcn3, text/x-rst)]] 
     18 
     19Notes: Component and port type definitions also fall under the generic "type definitions" term. Therefore, they are also allowed in a "!TypesAndValues" module. This may be subject to changes in the future. 
     20 
     21==== Templates Module Must Contain Only Template Definitions ==== 
     22 - '''Symbolic Name in XML Configuration''': checkTemplatesModuleContainmentCheck 
     23 - '''Dependant Tags in XML Configuration''': - 
     24 
     25Any module that contains the substring ''Templates'' in its name will be analyzed. Similar to the "!TypesAndValues" module restriction, only template definitions are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. The first three definitions are template definitions (one is within a group). The constant and function definitions that follow, however, are not allowed within a "Templates" module and therefore will produce a warning. 
     26 
     27'''Example:''' 
     28 
     29[[Include(source:trunk/t3q-examples/checkTemplatesModuleContainmentCheck/checkTemplatesModuleContainmentBad.ttcn3, text/x-rst)]] 
     30 
     31==== Functions Module Must Contain Only Function and Altstep Definitions ==== 
     32 - '''Symbolic Name in XML Configuration''': checkFunctionsModuleContainmentCheck 
     33 - '''Dependant Tags in XML Configuration''': checkFunctionsModuleContainmentCheckAllowExtFunction 
     34 
     35Any module that contains the substring ''Functions'' in its name will be analyzed. Similar to the other module restrictions, only function and altstep definitions are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. Additionally, external function definitions may (by default) or may not be allowed within such modules, depending on whether '''checkFunctionsModuleContainmentCheckAllowExtFunction''' is enabled or not. 
     36 
     37'''Example:''' 
     38 
     39[[Include(source:trunk/t3q-examples/checkFunctionsModuleContainmentCheck/checkFunctionsModuleContainmentBad.ttcn3, text/x-rst)]] 
     40 
     41==== Testcases Module Must Contain Only Testcase and Function Definitions That Are Referenced In Start Statements ==== 
     42 - '''Symbolic Name in XML Configuration''': checkTestcasesModuleContainmentCheck 
     43 - '''Dependant Tags in XML Configuration''': - 
     44 
     45Any module that contains the substring ''Testcases'' in its name will be analyzed. Similar to the other module restrictions, only testcase and function definitions that are referenced in start statements are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. 
     46 
     47'''Example:''' 
     48 
     49[[Include(source:trunk/t3q-examples/checkTestcasesModuleContainmentCheck/checkTestcasesModuleContainmentBad.ttcn3, text/x-rst)]] 
     50 
     51==== !ModuleParams Module Must Contain Only Modulepar Definitions ==== 
     52 - '''Symbolic Name in XML Configuration''': checkModuleParamsModuleContainmentCheck 
     53 - '''Dependant Tags in XML Configuration''': - 
     54 
     55Any module that contains the substring ''!ModuleParams'' in its name will be analyzed. Similar to the other module restrictions, only modulepar definitions are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. 
     56 
     57'''Example:''' 
     58 
     59[[Include(source:trunk/t3q-examples/checkModuleParamsModuleContainmentCheck/checkModuleParamsModuleContainmentBad.ttcn3, text/x-rst)]] 
     60 
     61==== Interface Module Must Contain Only Component and Port Definitions ==== 
     62 - '''Symbolic Name in XML Configuration''': checkInterfaceModuleContainmentCheck 
     63 - '''Dependant Tags in XML Configuration''': - 
     64 
     65Any module that contains the substring ''Interface'' in its name will be analyzed. Similar to the other module restrictions, only component and port type definitions are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. 
     66 
     67'''Example:''' 
     68 
     69[[Include(source:trunk/t3q-examples/checkInterfaceModuleContainmentCheck/checkInterfaceModuleContainmentBad.ttcn3, text/x-rst)]] 
     70 
     71==== !TestSystem Module Must Contain Only Component and Port Definitions ==== 
     72 - '''Symbolic Name in XML Configuration''': checkTestSystemModuleContainmentCheck 
     73 - '''Dependant Tags in XML Configuration''': - 
     74 
     75Any module that contains the substring ''!TestSystem'' in its name will be analyzed. Similar to the other module restrictions, only component type definitions are permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. 
     76 
     77'''Example:''' 
     78 
     79[[Include(source:trunk/t3q-examples/checkTestSystemModuleContainmentCheck/checkTestSystemModuleContainmentBad.ttcn3, text/x-rst)]] 
     80 
     81==== !TestControl Module Must Contain Only Control Part Definition ==== 
     82 - '''Symbolic Name in XML Configuration''': checkTestControlModuleContainmentCheck 
     83 - '''Dependant Tags in XML Configuration''': - 
     84 
     85Any module that contains the substring ''!TestControl'' in its name will be analyzed. Similar to the other module restrictions, only control part definition is permitted within such a module. The example below illustrates a module which will produce warnings if this quality check is enabled. 
     86 
     87'''Example:''' 
     88 
     89[[Include(source:trunk/t3q-examples/checkTestControlModuleContainmentCheck/checkTestControlModuleContainmentBad.ttcn3, text/x-rst)]]