Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

tsDetect: An Open Source Test Smells Detection Tool

85 views

Published on

Presented at: The 28th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE '20)

Date of Conference: Fri 6 - Fri 13 November 2020
Conference Location: Sacramento, California, United States (Online with Zoom)

Published in: Software
  • Be the first to comment

  • Be the first to like this

tsDetect: An Open Source Test Smells Detection Tool

  1. 1. TSDETECT An Open Source Test Smells Detection Tool Anthony Peruma, Khalid Almalki, Christian D. Newman, Mohamed Wiem Mkaouer, Ali Ouni, Fabio Palomba 2 8 t h A C M J o i n t E u r o p e a n S o f t w a r e E n g i n e e r i n g C o n f e r e n c e a n d S y m p o s i u m o n t h e F o u n d a t i o n s o f S o f t w a r e E n g i n e e r i n g ( E S E C / F S E ' 2 0 )
  2. 2. TEST SMELLS Test code, like production code, is subject to smells Formally introduced in 2001 with 11 smell types Inclusion of additional smell types, analysis of their evolution and longevity, and elimination patterns Tools to detect specific smell types Studies on traditional Java applications 01
  3. 3. EXISTING TOOLS ◸ TestQ by Breugelmans et al. -- visually explore and quantify test smells ◸ TeCRevis by Koochakzadeh et al. -- visualization of redundant tests ◸ T-Rex by Neukirchen et al. -- violations of TTCN-3 ◸ TestHound by Greiler et al. -- smells related to test fixtures ◸ Reichhart et al. -- detection of test smells in Smalltalk ◸ DTDetector by Zang et al. -- detection of dependent tests ◸ Bavota et al. -- detect nine types of test smells ◸ Palomba et al. -- detecting three types of test smells 02
  4. 4. GOAL The goal of this work is to provide the community with an open-source, extensible tool for the detection of multiple types of unit test smells 03
  5. 5. TSDETECT 04 Open- Source Test Smells Detection Standalone Executable
  6. 6. ARCHITECTURE 05
  7. 7. 19 DETECTED TEST SMELLS ◸ Assertion Roulette ◸ Conditional Test Logic ◸ Constructor Initialization ◸ Default Test ◸ Duplicate Assert ◸ Eager Test ◸ Empty Test ◸ Exception Handling ◸ General Fixture ◸ Ignored Test ◸ Lazy Test ◸ Magic Number Test ◸ Mystery Guest ◸ Redundant Print ◸ Redundant Assertion ◸ Resource Optimism ◸ Sensitive Equality ◸ Sleepy Test ◸ Unknown Test 06
  8. 8. EVALUATION ◸ F-Scores ranging from 87.8% to 100% ◸ Manual Evaluation: ◹ 20 infected instances per smell ◹ 65 annotated files ◹ 39 graduate and undergraduate students 07
  9. 9. APPLICABILITY 08 Practitioners Researchers Educators
  10. 10. THANKS! h t t p s : / / t e s t s m e l l s . g i t h u b . i o

×