alansastre / sedcat-plugin

SonarQube Sedcat plugin for quality measurement in unit testing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sedcat plugin for SonarQube

The Sedcat plugin for SonarQube allows developers get an overview on the state of quality in unit testing of a software project.

Quality Gate

Rationale

This plugin has expert systems for classifying uncertainty involved in assessing the quality of unit testing. Currently SonarQube has metrics for unit testing such as success and coverage. Sedcat uses the values of these metrics and others to provide new project-level metrics such as quality of unit tests and recommended actions to improve it.

Thus, a developer user can see on sedcat widget the percentage of quality corresponding to unit testing and which parameters needs to fix to improve that percentage and in what order of priority.

How does it works

The operations of Sedcat are divided into three parts:

  1. Reading input data. Internal and external metrics to the platform are read:

    • Unit Test Success.
    • Unit Test Coverage.
    • Unit Test Mutations Coverage (calculated with external Pitest Mutation Tool).
    • Number of Unit Test.
    • Total Lines of Code.
    • Complexity Average Class.
  2. Operations:

    • Adapt input data to expert systems.
    • Run expert systems. An expert system for quality metric and another system to get the set of improvement actions.
    • Process results.
  3. Send output data to the SonarQube platform for visual representation in the widget.

Expert systems have been developed with the fuzzy system development environment Xfuzzy in XFL3 language, synthesized in java language and integrated on plugin lifecycle.

More details at Sedcat Wiki.

Usage

Requirements and Compatibility Matrix

Sedcat Plugin SonarQube Pitest Mutation Tool
1.0.0 5.3 up to 5.5 1.1.4 and above

Plugin installation

The plugin can be directly downloaded from GitHub releases.

After having placed the plugin's jar in {SONARQUBE_INSTALL_DIRECTORY}/extensions/plugins you need to restart your SonarQube instance.

You have then to add the Sedcat Plugin widget to your project or view dashboard.

Plugin settings

The plugin have three options in General Settings:

  1. Complexity Threshold: allows set the threshold for acceptable complexity /class. If complexity of project is above this value, it negatively affects the quality metric and complexity will be an essential parameter to fix. Complexity is not a direct measure of the test, but it is an indirect measure. At more complexity, more complicated are unit tests and therefore more efforts must invest in developing them and maintenance. The default value is 30.
  2. Pitest reports directory path: specifies the directory path with reports generated by the Pitest mutation tool from where sedcat extracts mutations coverage.
  3. Sedcat active mode: enable or disable the plugin on the analysis.

Design

The software design of this project was carried out by UML language and is in the designUML folder.

Example results

Here is the widget: Sedcat Widget

Another examples in: Sedcat Wiki.

License

Copyright © 2016 Sonar Sedcat Plugin.

Licensed under GNU Lesser General Public License, Version 3.0

About

SonarQube Sedcat plugin for quality measurement in unit testing.

License:GNU Lesser General Public License v3.0


Languages

Language:Java 90.6%Language:HTML 9.4%