You might have heard about Mutation Testing before.
In the last 5 or 6 years it’s been a reasonably hot (“warm”?) topic to discuss in blogs and dev talks.
So what is the added value over code coverage with just Unit Testing?
Even if you could pride yourself with over 90% line and branch coverage, that coverage means nothing apart from that unit tests are touching production code.
It says nothing about how well that code is tested, it doesn’t care whether any asserts exist in your tests.
Imagine an engineer that tests a power drill he designed on a sheet of paper, and declaring that it does exactly what it was designed for: drilling holes.
It’s obvious that this test is meaningless for a power drill that is meant to be used on wood, steel or stone.
Since Java 9 we can specify that the Javadoc output must be generated in HTML 5 instead of the default HTML 4. We need to pass the option -html5 to the javadoc tool. To do this in Gradle we must add the option to the javadoc task configuration. We use the addBooleanOption method of the options property that is part of the javadoc task. We set the argument to html5 and the value to true.
In the following example we reconfigure the javadoc task to make sure the generated Javadoc output is in HTML 5:
Continue reading →
Recently we updated one of our internal applications from Spring Boot 1.5 to 2.1, which includes an update of Spring Security. After the update the OAuth2 security started to fail in the backend, it stopped recognizing the authentication.
The project is an Angular 4 application. It uses angular2-oauth2 (1.3) in the frontend, and spring-boot-security and spring-security-oauth2 on the backend. The frontend is responsible for authentication with our Bitbucket account. This information is then sent to the backend via a 'bearer' authentication token. We have a separate class extending WebSecurityConfigurerAdapter, annotated with @EnableOAuth2Client, to set our security settings.
Continue reading →