I released the intermediate package of my Test With Spring course. Take a look at the course >>

Java Testing Weekly 17 / 2016

There are many software development blogs out there, but many of them don’t publish testing articles on a regular basis.

Also, I have noticed that some software developers don’t read blogs written by software testers.

That is a shame because I think that we can learn a lot from them.

That is why I decided to create a newsletter that shares the best testing articles which I found during the last week.

Let’s get started.

Technical Stuff

  • Getting started with JavaScript testing using Jasmine provides a quick introduction to Jasmine that is used write BDD style tests for Javascript code. This blog post is useful for people who have never written tests for Javascript code or have never used Jasmine.
  • How I Made Peace With Automated Testing. Part 1 — You’re Using Too Many Mocks tells the story of a developer (the author) who didn’t want to write automated tests because it required a lot of work and took too much time. Luckily, this story has a happy ending. The developer realized that he was using too many mock objects. When he stopped overusing mock objects, he started to like writing automated tests.
  • Save Time by Writing Less Test Code announces my upcoming Test With Spring Course. The goal of this course is to help you to write automated tests for Spring web applications, and it describes how you can write less test code without sacrificing your test coverage. If you act fast, you can take advantage of the 50 percent discount that expires on Friday.
  • Testing a cacheable method with Mockito helps to write an automated test which ensures that Spring Framework’s cache abstraction is working as expected when you invoke a method that is annotated with the @Cacheable annotation. This is an interesting blog post and I think that you should have a smoke test which ensures that the cache abstraction is 1) configured properly and 2) working as expected. That being said, I think that you should not write tests which ensure that the Spring cache abstraction caches every cacheable method. The reason for this is that you should concentrate on testing your own code. Also, if you don’t trust that Spring Framework (or any tool) is working as expected, you should not use it.
  • Why Use a Builder Pattern? Examples of Telescoping Constructors when storing Address data identifies the problems caused by the telescoping constructor (anti)pattern, and describes how you can solve them by using the builder pattern. I think that the builder pattern is extremely useful tool for creating test data, but you shouldn’t overuse it because it is not free.

The Really Valuable Stuff

  • Approaching zero bugs is an interesting blog post that describes how the author has helped developers to improve their testing skills and do continuous delivery without writing a lot of automated tests. I must admit that this sounds a bit risky. On the other hand, if it is working for them, should they change it and start writing automated tests? Also, I love the idea that clean code has less bugs (mainly because I have noticed that it is true).
  • How TDD can make your team happier argues that TDD makes your team happier because of five reasons. This post (naturally) identifies these five reasons and describes how these things make your life easier. I think that the author definitely has a point, but I doubt that blog post will convince reluctant developers to start doing TDD. The reason for this is that most people will stop doing it when they hit the first roadblock (sadly, I am one of them). I do write a lot of automated tests, but most of the time I write them after I have finished the feature. Well, maybe it’s time to give TDD another chance.
  • Testing is not just a phase explains why testing is not a phase between end of development and release. I like this blog post a lot because it helped me to realize that I am basically testing all the time. This is not something that I do only at work. In a way my whole life consists of sequential tests. If you want to find out how I reached this conclusion, I recommend that you read this blog post.

It’s Time for Feedback

Because I want to make this newsletter worth your time, I am asking you to help me make it better.

P.S. If you want to make sure that you don’t ever miss Java Testing Weekly, you should subscribe my newsletter.

About the Author

Petri Kainulainen is passionate about software development and continuous improvement. He is specialized in software development with the Spring Framework and is the author of Spring Data book.

About Petri Kainulainen →

2 comments… add one

Leave a Comment