In this talk we would like to tell our story in testing our Eclipse project, EMF Parsley, and how we used code quality tools like Sonarqube to reach 0 technical debt.
EMF Parsley is an Eclipse project that provides a framework for quickly developing user interfaces based on EMF models. The framework allows for customization via dependency injection. It also provides an Xtext based DSL to quickly and cleanly configure and customize the UI components.
Due to the nature of the project we have several kinds of tests for the different components of the frameworks. When we started working on EMF Parsley, most of our tests were functional tests, based on SWTBot. We had to test the default behavior of our UI components but also the behavior in the presence of possible customizations. While this approach allowed us to test most of the parts of the framework, it was not optimal, especially for the execution time of functional tests and for the programming effort to specify different customization scenarios.
Nowadays, only a small part of our tests are functional tests: the biggest part is based on plain JUnit. Even if we write tests for UI components, we can test their behavior without a running Eclipse workbench, and most of the time we do not even need a Display. We use also mocking frameworks to make our tests cleaner and to be able to test even corner case situations. This way, it is much easier for us to test our components, and it is much faster to run such tests.
This allowed us to reach a good percentage of code coverage. We analyze our project with Sonarqube and we tried to follow Sonarqube issue reports to make our code clean as much as possible. Nowadays, we reached 0 technical debt.
In this talk we will describe our testing techniques and how we reached 0 technical debt.