All Posts By

Casper Rooker

Dabbling with DNS in AWS

While I’m working with Terraform, I’d thought I’d share the way I set up my DNS for my Virtual Private Cloud (VPC).

If you want traffic to be routed to one of your services, you need a DNS. AWS offers Route 53 as a DNS Service. ‘Hosted zones’ in the route 53 service define records like a telephone book defines phone numbers. At the time of writing, every hosted zone you add will cost about $0.61 per month. If you buy a domain from AWS, Route 53 will make a record for 4 name servers that will translate the domain to an IP address. If the domain is registered with another party, AWS offers straight forward steps to either migrate from that party’s DNS to Route 53, or let you add records of external name servers to Route 53.

There are ways to use AWS Services with an external DNS provider, but I recommend Route53 to save you a headache.

Take a look at the AWS docs to learn more about those steps.

Mutation testing in Maven & Sonarqube

Introduction

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.

Mutation tests aim to expose tests that cover the lines they’re meant to cover but are insufficient in testing the intent of the code. The idea behind this is fairly simple: introduce “mutants” in the code that is being tested, and check whether the unit tests that cover these mutants still succeed or start to fail. If a test still succeeds, that means the test falls short of verifying the complete intent of the code!

Continue Reading