Testing @ConfigurationProperties in Spring Boot 2.5.X

Three years ago, I wrote an article on how to test Spring’s @ConfigurationProperties classes. Since three years are a long time, I just updated the project on GitHub. It works with Spring 2.5.X now! You can find the project right here: https://github.com/tuhrig/Testing_Configuration_Properties And here’s the old post from 2018: https://tuhrig.de/testing-configurationproperties-in-spring-boot What’s it about? The basic […]

Testing @ConfigurationProperties in Spring Boot

*** Update *** I updated the example on GitHub to Spring 2.5.X! The latest post on this topic is at https://tuhrig.de/testing-configurationproperties-in-spring-boot-2-5-x. I recently worked on a library for using AWS Kinesis in Spring Boot. As many other libraries, this particular one provided a powerful configuration. To implement the configuration, we used Spring Boot’s @ConfigurationProperties (as […]

A component-based test architecture for Protractor and AngularJS E2E tests

Usually, when we talk about architecture, we talk about the application itself. We think about layers, domain models and interfaces to structure our code. Most of the time the tests will follow this architecture. We create one test per service and mirror our code.

This is fine for unit and even integration tests, but […]

AngularJS tests with mocked HTML documents

Most of the time, testing AngularJS applications means testing JavaScript. We test services and we test controllers. But what about directives? What about components? How do we test compiled and injected AngularJS code? Plunker But before we start, here’s the running Plunker with the complete example: https://plnkr.co/edit/PKn4tpUDFWyeqJ2Tb7Ba Testing directives/components Around a year ago I wrote […]

Don’t use transitive dependencies in AngularJS modules

Whenever you write an AngularJS application, you will use modules. Modules divide you application into small logical pieces. Some pieces might depended on other, some might be totally independent.

In the example above, you see three modules. A module called MainModule depending on two other modules, called UserModule and UtilModule. Note that this is […]