Blog

Automation of Admin Web UIs

Particularly in the operation of legacy web applications, there are often recurring administrative tasks. It is not uncommon for such applications to have an administrative interface, but no service interface usable for administration. However, administrative tasks can be automated with simple means, provided the web interface is well-structured from an HTML and HTTP perspective. Additionally, it is advantageous if the client-server interaction does not rely too heavily on server-side session states and provides different entry points for different operations.

Continue reading

What We Test

The discipline of testing has experienced a revival in recent years through agile development and automation. While manual tests, especially smoke tests and usability tests, still exist, the majority of tests, particularly unit tests, are now performed automatically. A large part of what we test are functions or features. These functions and features transform certain input parameters into an observable result.

Continue reading

Patterns for Dealing with Legacy Code: ServiceLoader

Legacy code is code that was not developed according to current standards of software development, is no longer maintained, and often is not or insufficiently documented. However, external, proprietary closed-source libraries often meet these criteria too. Often, this code is still operated and needs to be adapted from time to time, e.g., to comply with regulatory requirements. Legacy code often comes in the form of CLOBs. An undefined mass of lines of code, of which no one knows anymore what it does. The first step is to break down the system into its logical components. However, peripheral systems are often integrated via 3rd party libraries, and access to them occurs from the presentation layer through all other logical layers to the peripheral system in a single method. Before such a method can be refactored, the dependency on the peripheral system must be decoupled to write a test for the existing method. A simple tool from the Java toolset for decoupling the peripheral system is the ServiceLoader. The ServiceLoader is a simple dependency injection mechanism and part of the Standard Edition, i.e., available in every Java Runtime Environment since version 6. To use the ServiceLoader, you need three elements:

Continue reading

Mixins with Java

Mixins refer to additional functionality that can be added to a class. They are a special form of multiple inheritance, where properties or behaviors are inherited from several “parents.”

Continue reading

Exponential Growth of LoC is Not a Sign of Increased Productivity

One of the essential cornerstones of agile software development is its transparency. Teams continuously report on their progress, completed tasks, obstacles, team events, and the quality of their work. The capture of metrics is as much a part of the craft as targeted improvements that can be demonstrated with the help of these metrics - what gets measured, gets managed.

Continue reading

Multi-Module Integration Test Coverage with Jacoco and Sonar

In this article I describe how to setup jacoco for Maven multi-module projects so that integration test coverage can be calculated for the entire code base and analyzed using Sonarqube.

Continue reading

Mutation Testing

End of January I attended the OOP2015 conference in Munich. Among the load of interesting sessions was one that left a mark. It was the workshop conducted by Filip van Laenen and Markus Schirp about Mutation Testing (slides here), which I’d like to summarize in this post.

Continue reading