Test

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