How Good Are My Tests?

被引:41
作者
Bowes, David [1 ]
Hall, Tracy [2 ]
Petric, Jean [1 ,2 ]
Shippey, Thomas [1 ]
Turhan, Burak [3 ]
机构
[1] Univ Hertfordshire, Sch Comp Sci, Hatfield AL10 9AB, Herts, England
[2] Brunel Univ London, Dept Comp Sci, Uxbridge UB8 3PH, Middx, England
[3] Univ Oulu, M Grp M3S, ITEE, POB 3000, Oulu, Finland
来源
2017 IEEE/ACM 8TH WORKSHOP ON EMERGING TRENDS IN SOFTWARE METRICS (WETSOM) | 2017年
基金
英国工程与自然科学研究理事会; 芬兰科学院;
关键词
unit testing; test quality; metrics;
D O I
10.1109/WETSoM.2017.2
中图分类号
TM [电工技术]; TN [电子技术、通信技术];
学科分类号
0808 ; 0809 ;
摘要
Background: Test quality is a prerequisite for achieving production system quality. While the concept of quality is multidimensional, most of the effort in testing context has been channelled towards measuring test effectiveness. Objective: While effectiveness of tests is certainly important, we aim to identify a core list of testing principles that also address other quality facets of testing, and to discuss how they can be quantified as indicators of test quality. Method: We have conducted a two-day workshop with our industry partners to come up with a list of relevant principles and best practices expected to result in high quality tests. We then utilised our academic and industrial training materials together with recommendations in practitioner oriented testing books to refine the list. We surveyed existing literature for potential metrics to quantify identified principles. Results: We have identified a list of 15 testing principles to capture the essence of testing goals and best practices from quality perspective. Eight principles do not map to existing test smells and we propose metrics for six of those. Further, we have identified additional potential metrics for the seven principles that partially map to test smells. Conclusion: We provide a core list of testing principles along with a discussion of possible ways to quantify them for assessing goodness of tests. We believe that our work would be useful for practitioners in assessing the quality of their tests from multiple perspectives including but not limited to maintainability, comprehension and simplicity.
引用
收藏
页码:9 / 14
页数:6
相关论文
共 37 条
[1]   What Do The Asserts in a Unit Test Tell Us About Code Quality? A Study on Open Source and Industrial Projects [J].
Aniche, Mauricio Finavaro ;
Oliva, Gustavo Ansaldi ;
Gerosa, Marco Aurelio .
PROCEEDINGS OF THE 17TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING (CSMR 2013), 2013, :111-120
[2]   Are test smells really harmful? An empirical study [J].
Bavota, Gabriele ;
Qusef, Abdallah ;
Oliveto, Rocco ;
De Lucia, Andrea ;
Binkley, Dave .
EMPIRICAL SOFTWARE ENGINEERING, 2015, 20 (04) :1052-1094
[3]  
Bavota G, 2012, 2012 28TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE (ICSM), P56, DOI 10.1109/ICSM.2012.6405253
[4]  
Beck K., 2003, Test Driven Development: By Example
[5]  
Breugelmans M., 2008, J BUSINESS COMMUNICA
[6]   Empirical analysis of factors affecting confirmation bias levels of software engineers [J].
Calikli, Gul ;
Bener, Ayse .
SOFTWARE QUALITY JOURNAL, 2015, 23 (04) :695-722
[7]  
Causevic Adnan, 2012, 16th International Conference on Evaluation & Assessment in Software Engineering (EASE 2012), P223, DOI 10.1049/ic.2012.0029
[8]   Quality of Testing in Test Driven Development [J].
Causevic, Adnan ;
Punnekkat, Sasikumar ;
Sundmark, Daniel .
2012 EIGHTH INTERNATIONAL CONFERENCE ON THE QUALITY OF INFORMATION AND COMMUNICATIONS TECHNOLOGY (QUATIC 2012), 2012, :266-271
[9]   Validating and improving test-case effectiveness [J].
Chernak, Y .
IEEE SOFTWARE, 2001, 18 (01) :81-+
[10]   Modeling Readability to Improve Unit Tests [J].
Daka, Ermira ;
Campos, Jose ;
Fraser, Gordon ;
Dorn, Jonathan ;
Weimer, Westley .
2015 10TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE 2015) PROCEEDINGS, 2015, :107-118