InspectR - implement elements of gamification in programmer daily work

Programming is our passion. It drives us to create internal tools that improve our creative process. For the time being, over 50 such tools have come out of our production. Most of them we will definitely make "public" because we are not a typical, passive part of the community and we love to create Open Source solutions. A month ago we presented you Deep Image, today we want to show you InspectR.

Developers don't like to write tests

Let's be honest: developers don't like to write tests. First of all, they are convinced that their code is good enough, so there is no need to check it, secondly writing tests is a tedious work, about which we would like to forget. At this stage, procrastination and process delaying are often included.
Meanwhile, testing on a regular basis is a huge time saver, especially during the implementation.

We know from experience that it is best to implement tests systematically, then spend a few days or nights manually checking the application.

What is the problem then?

  1. Lack of a bait - an element that will act as a mobilizer.
  2. Lack of a central place with test reports (to check the results of tests we have to enter CI/CD builds),
  3. Lack of visualization of results and tools to compare several projects relative to tests.

How InspectR solves these problems?

  1. Motivates to build tests - thanks to gamification and competition elements.
  2. Modifies the typical practice that involves running test process manually or, in a CI/CD process, gives a focused place with tests reports.d
  3. In one window collects data from all projects - shows in black and white, which tests have passed and which have failed and how we look like in comparison to other projects.

"Let's do IT!" - mobilizing gamification in programmer daily work

InspectR

In InspectR, we put an element of competition between teams, that warms up the fight for testing. It's a rank system that shows us how our design looks like in comparison to other projects.

While working on InspectR, we were thinking about how to visually show the classification of projects - from the best to the weakest. Normally, we could simply give them numbers, or apply a normal score on a scale of 1-10. However, this is not our style - we are geeks and even the smallest details we like to develop in the climates of games, films, technologies. So... our graphic artist Jarek designed "level badges" based on the experience gained in games. You can also find them on our Behance profile: https://www.behance.net/TEONITE

Apart from them, in InspectR you will also find other forms of visualization of results - colors and dots, showing individual activities that determine what is working properly in a given project (green) and what needs to be improved (red). Thanks to them, you can immediately see what is happening in projects. Colors signal positive or negative test results and encourage you to fight for the best possible rank.

InspectR

The central place with test reports

At TEONITE, we value our and our clients time, that's why we focus on: repetitive processes automatization and the most transparent possible visualization. Kamil Chudy wrote about it a year ago on our blog and confirmed his words during the June 2017 edition of Netcamp.

InspectR works best when working on CI/CD - Continuous Integration and Continuous Delivery. In TEONITE, we use GitLab for this and instead of running tests manually or in a pipeline, we enable InspectR and run tools for QA, including:

  • automatic tests,
  • linters,
  • test coverage,
  • measures such as maintainability and cyclical complexity.

After activating InspectR to the test sequence, the application starts tests, inserts the results into the database and the dashboard reads the information. Et Voilà! All data is published on the dashboard.

InspectR consists of two parts:

  1. Dashboard built on React, with the Horizon library, which allows, from the level of javascript, polling the RethinkDB database.
  2. Command line tool, which we run on our projects.

Currently, we have plugins for our projects, which we have written:

  • FLAKE 8 - Python code linter, a tool that tells whether code standards are preserved
  • PYTEST TEST - Python automatic tests
  • python unittest - Python automatic tests
  • COVERAGE.PY - test coverage for Python
  • RADON MAINTAINABILITY - a measure of code complexity
  • RADON CYCLOMATIC COMPLEXITY - a cyclomatic complexity - a - measure that looks at the complexity of functions and depths of nesting
  • eslint - popular JavaScript linter
  • jasmine - a JavaScript framework for testing
  • mocha - j.w.
  • karma-coverage - test coverage for JavaScript

InspectR

You can also add your own plugins! We have made the InspectR available in the open source version (you can read about it later in the text).

Visualization of progress in building a project

The whole analysis mentioned above is presented on one,
transparent dashboard and this is the main task of InspectR - combining healthy competition, pointing out possible mistakes and encouraging continuous development of the test database. The dashboard is sorted starting from the design that is the best - passed the tests and meets all requirements.

After clicking on a given project, we can view a detailed inspection report, which contains the output of individual tools: InspectR downloads this output, parses it and translates it into a dashboard results, giving the image of the original test result, thanks to which we know what works and what has failed.

InspectR

InspectR has no limit of projects. The application has a built-in automatic scrolling function that allows you to set the view (for example, on a company TV) so that the whole team can see the progress of individual or all projects.

What appears in the view?

  1. High-level preview of how the project is maintained -shows us if everything works and we do not generate "technological debt"
  2. Detailed output of all tools.
  3. Refreshing the content - InspectR works on the basis of (mentioned earlier) RethinkDB database with the Horizon overlay. Thanks to this, new results that will be available in the database immediately appear on the dashboard.
  4. Project sorting - InspectR displays the best projects (which have the least errors and require the least amount of work to be repaired) in the first place.

InspectR in the open source version

We will make InspectR available on GitHub. The files are currently ready for publication and modification:

  1. Command line tool that we run on the project: https://github.com/teonite/inspectr-cli
  2. Dashboard, or web application for the visualization of results:: https://github.com/teonite/inspectr-dashboard

You can improve applications, change elements or expand according to your needs. Probably the first element you will want to add is the support of the tools you use. We tried to make these changes easy to implement.

However, if you do not have time to build your own parser for testing, all you need to do is create a GitHub issue, and the open source community (or we!) can write it in free time and let you know when it's available. Viva Comunità!

Summarizing:

InspectR is a simple tool that actually does a rather important thing - thanks to it we have a clearly presented situation regarding the quality of the code.

This is a project that could be used by people responsible for QA, individuals, companies and even larger teams that develop their products, eg. by dividing projects into modules.

For us, InspectR is a universal tool that helps us maintain the right level of testing in many projects while giving a large portion of fun.

Downloads:

hire us

Let’s talk about Mobile Apps

We’d love to design, develop and release them for you.

Highest DevOps Standards

Our team wield the right skills to make things work.

Angular magic in the making

Most flexible development technology for stunnig results.

Web Apps cooked the right way

The ultimate combination of code, design and user experience.

Django REST Framework

TEONITE develops, supports and donates open source projects.