Key concepts: actions and practices

Action

Actions form the essential input provided by Themis. From events provided by the development teams, Themis provides actions that identify their effect on the project quality. 3 kinds of actions exists in Themis:

Clean action

A clean action labels an action that follows the established practice.

Example: a change on a file that does not impact its code coverage.

Corrective action

A corrective action brings improvements and fixes. It follows previous harmful actions.

Example: a change on a file that increases its code coverage.

Harmful action

A harmful action produces a deterioration and shows a case where the guidelines have not been followed.

Example: a change on a file that reduces its code coverage.

The meaning of every action is specified, implemented and set up in Themis, that will instantiate these actions progressively from its constatations.

Practices

A practice specifies a set of kinds of clean, corrective or harmful actions that fits a precise problem of a software development environment. Themis asses the follow-up of several practices independently and measures the actions performed by the teams on these practices.

There are 3 practices in Themis. Here are the description with their respective set of actions.

Technical debt (DET)

This practice quantifies a set of actions regarding the follow-up of good practice associated with the writing of the source code. These good practices decided by the tool used on your project (the linter) for the static analysis of the source code.

 Clean action: 

  • Clean change: during a commit, a file has been updated and no new violation has been added or removed

 Corrective action:

  • Debt reduction: during a commit, a file has been updated and the number of violation that it contains has decreased
  • Debt cancelling: during a commit, a file has been updated and all the violations that it contains has been removed

 Harmful action:

  • Debt increase: during a commit, a file has been updated and violations has been added

Code coverage (COV)

This practice follows the effect of changes of code about the code coverage. In this practice, a default threshold to reach is set that is of 80%. This value may be modified for each project.

 Clean actions: 

  • Creation and threshold OK: during a commit, a file has been added and its coverage respects the required threshold
  • Creation and full coverage: during a commit, a file has been added and its coverage is of 100%
  • Increase (on threshold): during a commit, a file has been modified and its coverage has increased, and this one still respects the required threshold
  • Maintained level: during a commit, a file has been modified and its coverage has stayed identical
  • Increased (below threshold): during a commit, a file has been modified and its coverage has increased, but this one lies below the required threshold
  • Maintained level (on threshold): during a commit, a file has been modified and its coverage has stayed identical. However, this one still respects the required threshold
  • Maintained level (below threshold): during a commit, a file has been modified and its coverage has stayed identical. However, this one still lies below the required threshold

 Corrective action:

  • Reached threshold: during a commit, a file has been modified and its coverage now respects the required threshold
  • Full coverage: during a commit, a file has been modified and its coverage has reached the 100%

 Harmful actions:

  • Creation and below the threshold: during a commit, a file has been added and its coverage lies below the required threshold
  • Decrease (below threshold): during a commit, a file has been modified and its coverage has decreased, and this one still lies below the required threshold
  • Passing below the threshold: during a commit, a file has been modified and its coverage now lies below the required threshold
  • Decreased (on threshold): during a commit, a file has been modified and its coverage has decreased, but this one still respects the required threshold

Test-First Development (TFI)

This practice analyse, when the files are modified, if the edited or added lines are covered or not by unit tests. 2 types of actions exist for this practices.

 Clean action

  • Covered line: during a commit, a file has been modified and all added or modified lines are covered by tests

 Harmful action:

  • Not covered lines: during a commit, a file has been modified and some added or modified lines are not covered by tests

Frequently asked questions

How are the authors of the actions determined?

Themis analyze the date of your source code from every source that you have integrated in the platform. The history of the commits allows to characterize every change of a commit in an action action. By default, only one person may be the author of a commit and therefore an action. We We however offer a tip to take into account practices such as pair-programming, or more broadly mob-programming.

What happens when a file is removed from the code respository?

No action will be generated by Themis when a file is removed from a code source repository. Thus, even if this file contained defaults of code, there will be no associated corrective action.

Between two code analysis, there are several modification of a file. How does it show up in Themis?

Themis will endeavor to characterize each commit having taken between two analysis of code or two calculation of code coverage. If a file has been edited in several commits, and that the last indicate a decrease of the number of defaults of code, Themis will take sides to assign to one of the commits the corrective action of reduction of defaults, and the others will generate clean actions.

What may one set one the practices?

Each practice is configurable by project. It is possible to modify parameters specific to the practices and to modify the level of each action. It is not possible to deactivate types of actions.

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.