“Bad Smells” in TTCN-3 Test Suites Martin Bisanz, Jens Grabowski, Helmut Neukirchen, Benjamin Zeiss Software Engineering for Distributed Systems Group.

Slides:



Advertisements
Similar presentations
MiL Testing using TTCN-3: Concepts and Case Study Marcus Mews, Technical University of Berlin * Jaroslav Svacina, Fraunhofer FIRST.
Advertisements

Min Zhang School of Computer Science University of Hertfordshire
REFACTORING. What is refactoring ? In refactoring, you start with the basic code and make it better. Change the internal structure of the existing code.
Reverse Engineering © SERG Code Cloning: Detection, Classification, and Refactoring.
OORPT Object-Oriented Reengineering Patterns and Techniques 7. Problem Detection Prof. O. Nierstrasz.
A conformance test suite for TTCN-3 tools Benjamin Zeiss, T-Systems Andras Kovacs, Broadbit Bogdan Stanca-Kaposta, Testing Technologies.
An overview on the Testing and Test Control Notation version 3 (TTCN-3) Helmut Neukirchen Háskóli Íslands
Preventive Software Maintenance: The Past, the Present, the Future Nikolaos Tsantalis Computer Science & Software Engineering Consortium for Software Engineering.
Architecture Eclipse Framework with Plugin Concept JTransformer Plugin Analysis + Transformation interface: logical Program.language keeps representation.
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
REFACTORING Improving the Design of Existing Code Atakan Şimşek e
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Chapter 24 - Quality Management Lecture 1 1Chapter 24 Quality management.
Testing RAVEN Helmut Neukirchen Faculty of Industrial Engineering, Mechanical Engineering and Computer Science University of Iceland, Reykjavík, Iceland.
10th TTCN-3 User Conference, 7-9 June 2011, Bled, Slovenia AUTOSAR Conformance Tests - Feedback on their development and utilization Alain Feudjio-Vouffo,
Maintenance Refactoring and Code Smells. Where are we? Over the semester we have talked about Software Engineering. The overall goal of software engineering.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
What's New In Progress Developer Studio for OpenEdge?
An Approach and Tool for Synchronous Refactoring of UML Diagrams and Models Using Model-to-Model Transformations Hafsteinn Þór Einarsson Helmut Neukirchen.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
Software Reliability SEG3202 N. El Kadri.
1 How to Apply Static and Dynamic Analysis in Practice © Software Quality Week ‘97 How to Apply Static and Dynamic Analysis in Practice - Otto Vinter Manager.
Refactoring Cristescu Marilena. Definitions Loose Usage: Reorganize a program(or something) As a noun: a change made to the internal structure of some.
1 TRex Paul Baker 1, Dominic Evans 1, Jens Grabowski 2, Helmut Neukirchen 2, Benjamin Zeiss 2 The Refactoring and Metrics Tool for TTCN-3 Test Specifications.
Software Refactoring Part I: Introduction Bartosz Walter Advanced Object-Oriented Design Lecture 5.
Sadegh Aliakbary Sharif University of Technology Spring 2012.
Mining and Analysis of Control Structure Variant Clones Guo Qiao.
Aspect Mining Eclipse Plug-in Provide the integrated aspect mining environment in the Eclipse IDE. Consists of the following functional components –Flexible.
Refactoring1 Refactoring DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING CONCORDIA UNIVERSITY February 6, 2009.
Institute for Telematics University of Lübeck, Germany M. Ebner, M. Schmitt, J. Grabowski Test Generation with Autolink and TestComposer.
Improving the Quality of Existing Code Svetlin Nakov Telerik Corporation
Barbara Weber Univ. of Innsbruck, Austria Manfred Reichert Univ. of Ulm, Germany Presenter: Arghyadip Paul Refactoring Process Models in Large Process.
1 Context-dependent Product Line Practice for Constructing Reliable Embedded Systems Naoyasu UbayashiKyushu University, Japan Shin NakajimaNational Institute.
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
Refactoring 101 William C. Wake
Sadegh Aliakbary Sharif University of Technology Spring 2011.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
Automatically detecting and describing high level actions within methods Presented by: Gayani Samaraweera.
2160 – Using Together in Delphi  John Kaster  Principal Engineer, Borland.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 31. Review Creational Design Patterns – Singleton Pattern – Builder Pattern.
Scalable Clone Detection and Elimination for Erlang Programs Huiqing Li, Simon Thompson University of Kent Canterbury, UK.
SSQSA present and future Gordana Rakić, Zoran Budimac Department of Mathematics and Informatics Faculty of Sciences University of Novi Sad
1 Simple provisioning, complex consolidation – An approach to improve the efficiency of provisioning oriented optical networks Tamás Kárász Budapest University.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Survey of Tools to Support Safe Adaptation with Validation Alain Esteva-Ramirez School of Computing and Information Sciences Florida International University.
Pertemuan 12 Refactoring Mata kuliah: T0144 – Advanced Topics in Software Engineering Tahun: 2010.
Copyright 2015, Robert W. Hasker. Continuous Inspection  Code reviews  Powerful tool  Difficult to ensure meaningful reviews take place  Static analysis.
Do Metrics Help to Identify Refactoring? Jean-Guy Schneider Rajesh Vasa
Unified functional/load test architecture and methodology using TTCN-3 TELEFÓNICA I+D Date: June 1st, 2007.
Jidoka in Software Development Emanuele Danovaro, Andrea Janes, Giancarlo Succi Center for Applied Software Engineering Free University of Bolzano/Bozen,
Work Item “Patterns in Test Development (PTD)” Re-start Meeting 17 March, Berlin Helmut Neukirchen Institute for.
XML-based Representation of Test Cases for Distributed Systems Alexander Kraas 7. October 2008.
Wolfgang Runte Slide University of Osnabrueck, Software Engineering Research Group Wolfgang Runte Software Engineering Research Group Institute.
Principles and examples
Applying Combinatorial Testing to Data Mining Algorithms
Hardware & Software Reliability
Do Developers Focus on Severe Code Smells?
We need your input on gaps in Software Engineering (SE) for HPC!
Code Smells 1.
Refactoring and Code Smells
ReSharper Dainius Kreivys.
Advanced Programming Behnam Hatami Fall 2017.
Implementing the Standardised Mapping of TDL to TTCN-3
Refactoring.
Refactoring and Code Smells
Develop a Reliability Test in TTCN-3
Refactoring.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Refactoring and Code Smells
Presentation transcript:

“Bad Smells” in TTCN-3 Test Suites Martin Bisanz, Jens Grabowski, Helmut Neukirchen, Benjamin Zeiss Software Engineering for Distributed Systems Group Institute for Informatics Georg-August-University Göttingen Germany

Pattern-Based Quality Assessment of TTCN-3 Test Suites 2 Outline 1.Introduction 2.TTCN-3 Code Smells 3.Smell Detection in TRex 4.Summary / Outlook

Pattern-Based Quality Assessment of TTCN-3 Test Suites 3 1. Introduction Presentation at T3UC 2006: TRex Tool Improvement of test code: Refactoring. Issue Detection: Metrics. Systematic investigation of bad patterns.  Code smells “certain structures in the code that suggest (sometimes they scream for) the possibility of refactoring” Fowler: Refactoring – Improving the Design of Existing Code. Addison-Wesley, 1999

Pattern-Based Quality Assessment of TTCN-3 Test Suites 4 Outline 1.Introduction 2.TTCN-3 Code Smells 3.Smell Detection in TRex 4.Summary / Outlook

Pattern-Based Quality Assessment of TTCN-3 Test Suites 5 2. TTCN-3 Code Smells Example Excerpt from standardised SIP test suite: function ptc_CC_PR_TR_CL_TI_015(CSeq loc_CSeq_s) runs on SipComponent { var Request v_BYE_Request; initPTC(loc_CSeq_s); v_Default := activate(defaultCCPRPTC()); tryingPTCBYE(); waitForTimeout(65.0*PX_T1); notRepeatBYE(PX_TACK); } //end ptc_CC_PR_TR_CL_TI_015 Variable is never used! Default for alternatives activated, but never deactivated. Hard coded “magic” values.

Pattern-Based Quality Assessment of TTCN-3 Test Suites 6 TTCN-3 Code Smells TTCN-3 code smells: patterns of possibly inappropriate code usage. Notion of metrics and code smells not disjoint: Code smell  Metric: count occurrences of code smell. Metric  Code smell: metric violates boundary.

Pattern-Based Quality Assessment of TTCN-3 Test Suites 7 TTCN-3 Code Smell Catalogue Collected TTCN-3 code smells in a structured catalogue. So far identified 38 TTCN-3 code smells with respect to Duplicated Code, References, Parameters, Complexity, Default Anomalies, Test Behaviour, Test Configuration, Coding Standards, Data Flow Anomalies, Miscellaneous,

Pattern-Based Quality Assessment of TTCN-3 Test Suites 8 TTCN-3 Code Smell Description Fixed format: Name, Description, Motivation, Options, Related Action(s), Example.

Pattern-Based Quality Assessment of TTCN-3 Test Suites 9 TTCN-3 Code Smell (Example): Idle PTC Description: A PTC is created but never started. Motivation: A PTC which is not started is of no use for the test case. Related Action(s): Insert a start statement. Remove the PTC.

Pattern-Based Quality Assessment of TTCN-3 Test Suites 10 TTCN-3 Code Smell (Example): Idle PTC TTCN-3 Example: testcase exampleTestCase() runs on MTCType system SystemType { //... var PTCType exampleComponent := PTCType.create map(self:aPort, system:aPort); connect(self:anotherPort, exampleComponent:aPort); // no start here }

Pattern-Based Quality Assessment of TTCN-3 Test Suites 11 Outline 1.Introduction 2.TTCN-3 Code Smells 3.Smell Detection in TRex 4.Summary / Outlook

Pattern-Based Quality Assessment of TTCN-3 Test Suites Smell Detection in TRex New TRex functionality in 2007: Automatic Detection of TTCN-3 code smells Uses Eclipse TPTP Analysis Framework Currently: 11 smells from the smell catalogue Complexity Metrics

Pattern-Based Quality Assessment of TTCN-3 Test Suites 13 TTCN-3 Code Smell Detection Configuration

Pattern-Based Quality Assessment of TTCN-3 Test Suites 14 TTCN-3 Code Smell Detection Results

Pattern-Based Quality Assessment of TTCN-3 Test Suites 15 Application of TRex Metric / TTCN-3 Code SmellSIPIPv6 Lines of code Number of testcases Number of components210 Duplicate Alt Branches Activation Asymmetries73317 Distinct Magic Values Unused Definitions50156

Pattern-Based Quality Assessment of TTCN-3 Test Suites 16 Outline 1.Introduction 2.TTCN-3 Code Smells 3.Smell Detection in TRex 4.Summary / Outlook

Pattern-Based Quality Assessment of TTCN-3 Test Suites Summary and Outlook Summary: TTCN-3 code smells. TRex tool for automatic detection of TTCN-3 code smells. Smell-reated observations in the SIP and IPv6 test suites. Outlook: Make TTCN-3 code smell catalogue publicly available. Realisation of a more flexible code smell representation.

Pattern-Based Quality Assessment of TTCN-3 Test Suites 18 Thank you for your attention! Visit our booth for a demo!