Java Testing Weekly 1 / 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

  • Using wrapper methods for better error handling in Selenium describes how you can write cleaner Selenium tests by moving error handling and waiting logic to wrapper methods. This is an excellent technique and you should use it when you create page objects.
  • REST-assured How to Check Response Times explains how you can write tests which fail if the response time is too long. If you use REST Assured, you should use this approach for ensuring that your web application fulfills its performance requirements.
  • Automate Amazon: Writing a Sign In Test describes how you can write a Selenium test for the sign in function of This is a very good post because it basically explains everything that is required to test the sign in function. Also, you should read the other parts of this tutorial as well.
  • Setting up pre-commit tests with Git explains how you can ensure that you cannot commit broken into your Git repository. I admit that most of the time you should probably let your CI server to take care of this, but if you need to make your CI jobs faster, this post will help you to do it.
  • Writing Test Data Builders Made Easy With Kotlin is a very well written blog post that helps you to create test data builders with Kotlin. I have written a lot of test data builders with Java, and it was amazing to see that you can create test data builders without writing any boilerplate code.
  • Legacy Code To Testable Code #12: Instance Constructors describes how you can refactor legacy code into testable code by moving the initialization logic from the constructor to the initialize() method. If you are working with legacy code, the odds are that you will face this problem, and this blog post helps you to solve it in a "clean" way. By the way, if you are working with legacy code, you might want to read the other parts of this tutorial as well.
  • JUnit integration testing with Docker and Testcontainers helps you to write automated tests for Java code that is deployed to a Docker container. This is a really cool and well written article. If you have to time read only one technical post from this list, I recommend that you read this one.
  • Not testing your Angular code? Here's how to start explains how you can start writing tests for AngularJS code. I know from experience that getting started with AngularJS testing can be hard because people are very good at making up excuses (or least I was). However, I also know that getting started is the hardest part. If you are the one making excuses, take a look at this blog post.

The Really Valuable Stuff

  • Introducing BDD provides an excellent introduction to behavior-driven development (BDD). You should read this blog post even if you are not doing (or planning to do) BDD because it has some great insights about naming your test methods and test classes.
  • Automation Language Is Not (Necessarily) Your Development Language argues that we should be more open-minded when we select that programming language which is used to write automated tests for our code. I agree. I think that we should be ready to go out from our comfort zone because it is the only way we can see the benefits and drawbacks of using different language for testing purposes.
  • Test-driven development can be great is an interesting blog post which describes the author's (positive) experiences from TDD.
  • Testing the Design - Part I identifies the things that we should take into account when we are evaluating / designing the user interface of our application. The list is quite long, and some of the things on that list are very hard (or impossible) to automate. I think that this blog post should help you to realize why you need software testers.
  • Testpappy’s International Testing Standard describes the minimum level of testing that should be done to every software project. Once again, the list is quite long and I must admit that there is no way that developers can do everything on that list because they don't have time to do it and they don't know how to do it correctly.
  • Smarter Testing Through Smarter Testers is the latest episode of the TestTalks podcast that is hosted by Joe Colantonio. In this episode Christin Wiedemann will talk about concentrating on things that matter. This episode is 30 minutes long, but if you want learn more about selecting the correct test cases, I recommend that you take the time to listen it. By the way, if you are short of time, and you cannot test everything, you really need to know how to prioritize all test cases and select the most important ones. If you listen this episode, you will learn to do it.

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.

12 comments… add one
  • That's a great idea! Looking forward to your new series.

    • Thanks! I already started gathering links for the next post. If you happen to find an interesting blog post, let me know. :)

      • I've recently been looking at ways to run integration tests against my services which make use of Spring's JavaMailSender and came across this blog post which I found useful:

        I'd be interested in learning other approaches to testing mail sending services as well.

        • That is a very good blog post. I have used the same approach, but I had to replace FakeSMPT with Greenmail because for some reason FakeSMTP didn't work (I cannot remember what the problem was).

  • Hi Petri,

    Is this a different newsletter from the Spring one?

    • Yes. I am not publishing any other newsletters at the moment.

      Update: I just realized that OP might have talked about my email newsletter. If someone has subscribed my email newsletter, this person will get Java Testing Weekly (and my other blog posts) in his/her inbox. - Petri

  • Thank you very much!

    • You are welcome.

  • "Automate Amazon: Writing a Sign In Test describes how you can write a Selenium test for the sign in function of This is a very good post because it basically explains everything that is required to test the sign in function. Also, you should read the other parts of this tutorial as well."

    Thank you so much for the kind words, Petri!

    I have been attempting to switch from being just a manual tester to an actual automation engineer for years, coming up with little Selenium / Java side projects, trying to remember what I was taught when I studied software development in grad school. That section on my site is just another practice exercise, writing tests as I am learning to do at Fitbit. I am glad you enjoyed it!

    -T.J. Maher

    • You are welcome. I am sure that you will be successful in your transition because it seems that you are working hard and doing the right things. Keep up the good work and you will be rewarded for it.

  • Thanks Petri for considering my blog post on writing test data builders using Kotlin.

    • You are welcome. It is a very good blog post. :)


Leave a Comment

Cancel reply