Giter Site home page Giter Site logo

testsmells / testsmelldetector Goto Github PK

View Code? Open in Web Editor NEW
68.0 7.0 38.0 356 KB

A tool to detect test smells in Java projects that utilize JUnit as the testing framework

Home Page: https://testsmells.github.io/

License: GNU General Public License v3.0

Java 53.60% Kotlin 46.40%
java smell junit android code-smells test-smells javaparser rit rit-college

testsmelldetector's Introduction

Test Smell Detector

Introduction

Unit test code, just like any other source code, is subject to bad programming practices, known also as anti-patterns, defects and smells. Smells, being symptoms of bad design or implementation decisions, has been proven to be responsible for decreasing the quality of software systems from various aspects, such as making it harder to understand, more complex to maintain, more prone to errors and bugs.

Test smells are defined as bad programming practices in unit test code (such as how test cases are organized, implemented and interact with each other) that indicate potential design problems in the test source code.

Project Overview

The purpose of this project is twofold:

  1. Contribute to the list of existing test smells, by proposing new test smells that developers need to be aware of.
  2. Provide developers with a tool to automatically detect test smell in their unit test code.

More Information

Visit the project website: https://testsmells.github.io/

Execution

Running the jar with --help will print its usage.

  • A CSV input file always need to be given as parameter, specified with -f;
  • A detection threshold can also be specified. Possible values are default and spadini. The flag is -t. By default, the tool uses the thresholds that have been originally implemented; with spadini, sensibility thresholds published by Spadini et.al. will be used.
  • One can specify the granularity of the detection. boolean will return either true or false, respectively if a given smell is present or not in the test; numerical will return instead the number of smelly instances detected.
Options:
  -f, --file PATH                  The csv input file
  -t, --thresholds [default|spadini]
                                   The threshold to use for the detection
  -g, --granularity [boolean|numerical]
                                   Boolean value of numerical for the
                                   detection
  -o, --output TEXT
  -h, --help                       Show this message and exit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.