1
play

1 5 6 Motivation: Module Dependencies Dependency Analysis Local - PDF document

2 2 Outline Motivation Dependency and Guideline Analysis for TTCN-3 Dependency Analysis Steffen Herbold, Philip Makedonski, Guideline Analysis Jens Grabowski, Kathrin Becker, Stefan Kirchner, Benjamin Zeiss Tools


  1. 2 2 Outline • Motivation Dependency and Guideline Analysis for TTCN-3 • Dependency Analysis Steffen Herbold, Philip Makedonski, • Guideline Analysis Jens Grabowski, Kathrin Becker, Stefan Kirchner, Benjamin Zeiss • Tools Georg-August-Universität Göttingen, Germany • Summary & Outlook 3 4 Motivation Motivation: Module Dependencies • Increasing test suite complexity • How does a local change affect the rest of the test • More than 200.000 LOC for next-generation test suites B C D suite? • Maintainability? • Are there any superfluous • Early dev. version of the ETSI 3GPP LTE/SAE test suite: imports? • Approx. 20.000 LOC A • 411 imports • What elements are affected • 3361 references by an element freeze? Coupling? • 2457 external references • 904 internal references • Is a module a library? E F • Enforcing guidelines • prevents mistakes • Is a module element public, • reduces effort for maintenance and deliveries private, or deprecated? 1

  2. 5 6 Motivation: Module Dependencies Dependency Analysis • Local change: Import A B A B e1 e1 Internal references e2 e2 e3 e3 External references e4 e4 Testcase 1 Testcase 1 e5 e5 Testcase 2 Testcase 2 Testcase 3 Testcase 3 7 8 Dependency Analysis Dependency Analysis • Local change: • Local change: • Addition of new external dependencies, higher coupling • Addition of new internal dependencies, stronger cohesion C A B C A B e1 e1 e2 e2 e3 e3 e6 e6 e4 e4 e7 Testcase 1 e7 Testcase 1 e5 e5 Testcase 2 Testcase 2 Testcase 3 Testcase 3 2

  3. 9 10 Dependency Analysis Dependency Analysis • Local change: • Element freeze: • Testcase 3 is frozen, all dependencies must not be changed anymore • Removal of dependencies, less coupling, superfluous imports C A B A B e1 e1 e2 e2 e3 e3 e6 e4 e4 e7 Testcase 1 Testcase 1 e5 e5 Testcase 2 Testcase 2 Testcase 3 Testcase 3 11 12 Dependency Analysis Dependency Analysis • Primitive library: • Public / private / deprecated elements: • No further imports, only incoming dependencies, no test cases • Non-primitive library: • No test cases, mostly incoming dependencies A B A B e1 e1 e3 e2 public e2 e4 e3 e5 private / e4 Testcase 1 deprecated Testcase 1 e5 Testcase 2 Testcase 2 Function 1 Testcase 3 … Testcase 3 … 3

  4. 13 14 Guideline Analysis Guideline Analysis: Naming Conventions • Guidelines are a constructive QA measure to prevent • Examples: mistakes or quality problems. • Test case numbering: • TC_COR_0009_47_ND • Guideline analysis is an analytical QA measure to • Non-Default altstep prefix: continuously enforce guidelines during the development. • a_ receiveSetup() • Examples: • Default altstep prefixes: • Naming conventions • d_ receiveSetup() • Test data structuring • Style conventions • Implications: • Modularization rules • Better understandability 15 16 Guideline Analysis: Test Data Structuring Guideline Analysis: Style Conventions • Examples: • Examples: • Grouping of related definitions • Formatting style • Nesting of alt-statements • Alphabetic ordering of types within groups • Depth of stacked template modifications • Order and placement of local definitions • Implications: • Implications: • Better understandability • Improved locality  Better understandability, • Better maintainability Better maintainability • Better reusability 4

  5. 17 18 Guideline Analysis: Modularization Rules Dependency / Guideline Relationships • Examples: • Dependencies promote quality attributes: • Modules names imply their content • Bad quality affects dependent modules • TypesAndValues, Templates, … • High Fan-In  Big Impact on Quality • Determination of modules with high risk • Standard-Imports must exist • LibCommonDefs, … • Guidelines may involve dependencies: • No unused imports • Other modularization concepts exist! • Standard imports must exist • Over-specific runs on clause • Implications: • Better locality  Better understandability • Bundling of elements that belong together 19 20 T3Q – TTCN-3 Guideline Checker Tools • T3Q • Fine-grained XML configuration with project profiles • Static guideline checking • Approx. 30 guideline checks implemented • T3D • Naming conventions • HTML Documentation Generator (Javadoc-like) • Log format must match a regular expression • No unused definitions on module level • Templates module must contain only template definitions • T3Pendency • No unused imports • Test-Suite Dependency Analysis • No "all" keyword in port type definitions • No label or goto statements • Open-Source • … • Eclipse Public License (EPL) • Based on the TRex infrastructure • Code formatting • TTCN-3 v4.1.1 support • Cross-platform • Basic size metrics (LOC, No. of test cases,…) • Command-line tools, scheduled execution possible 5

  6. 21 22 T3D – TTCN-3 Documentation Generator T3D – Main View • XML representation of module definition dependencies • Generation of different switchable views using XSLT: • Main view • TTCN-3 listings with cross-links • Testcase view • Dependencies between test cases and module parameters • Import view • Import relationships • Documentation as HTML • Customizable look & feel 23 24 T3D – Import View T3D – Module Parameter View 6

  7. 25 26 T3Pendency – TTCN-3 Dependency Analyzer T3Pendency – TTCN-3 Dependency Analyzer • Calculation of dependency metrics: • Number of Imports / Number of superfluous Imports • Number of modules that reference a given module (Fan-In) • Number of modules referenced by a given module (Fan-Out) • Number of internal / external references • Can be determined at the level of: • Modules • Module definitions • Public / private suggestions • Graphviz visualization 27 28 T3Pendency – TTCN-3 Dependency Analyzer Summary & Outlook • Summary: • Dependency analysis • Guideline analysis • Relationships between Dependencies and Guidelines • T3Q, T3D, T3Pendency tools • Outlook: • Freely available, open-source (EPL) • Download at http://t3tools.informatik.uni-goettingen.de • TRex for Refactoring and Metrics, IDE: • http://www.trex.informatik.uni-goettingen.de • More guideline checks, more features, but … • No commercial support  community-driven tool maintenance! 7

  8. 29 Contact • Websites: • http://www.trex.informatik.uni-goettingen.de • http://t3tools.informatik.uni-goettingen.de • E-Mail: • t3tools@informatik.uni-goettingen.de • Acknowledgments: • ETSI CTI, STF 160 8

Recommend


More recommend