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

Java Testing Weekly 27 / 2016

An astronaut meets a ufo

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

  • Data-driven tests in Junit5.0.0-SNAPSHOT describes how you can write parameterized tests with JUnit 5.0.0-SNAPSHOT. Also, if you think that the current approach looks a bit clumsy (at least when compared to Spock), don’t worry. It seems that JUnit 5 will have a new solution to this problem soon.
  • Page Factories: Setting up, creating them, and understanding how they work describes how you can create page objects by using Selenium WebDriver and the PageFactory class. This is a really cool trick that helps you to create clean page objects by writing less code.
  • Screenplays and Journeys, Not Page Objects identifies the problems caused by page objects and argues that you should replace them with the screenplay pattern. I agree that page objects can cause a lot of problems, but the thing is that I never write so many end-to-end tests that these problems would be unmanageable. My goal is to write as few end-to-end tests as possible because I think that integration tests (aka API tests) give me a lot better ROI. Thus, I don’t see that using screenplay is worth it in my situation because I write only a few end-to-end tests and it seems to make things a lot more complex. On the other hand, if you do write a lot of end-to-end tests, you should check out how you can implement the screenplay pattern with Serenity (part 1, part 2, and part 3).
  • Using WebDriver to automatically check for JavaScript errors on every page (2016 edition) describes how you can write an end-to-end test which verifies that your application doesn’t have any Javascript errors on the console. This is a really cool trick. If you are using Javascript (who isn’t?), you should definitely read this blog post.

I just finished the "Writing Integration Tests for Spring Web Applications" topic of my "Test With Spring" course:

CHECK IT OUT >>

The Really Valuable Stuff

  • Ten Tired Trends In Software Testing Discourse is a bit ranty blog post, but it has a valid point. These harmful trends do not actually help anyone to be a better tester. These trends only help people to strengthen their current views and opinions. This is a risky strategy because it turn people into expert beginners.
  • The Difference Between Trying and Doing is an excellent post which argues that if you are trying to do something, the odds are that you don’t do it. Even though this is not a testing related post, I think that you can learn something valuable from it. For example, when was the last time you said (or heard someone saying): “Yeah, I know that I should write automated tests. I will try to write them in the future” or “I will try to improve my testing skills”. I have heard these words quite often, and the reality is that these people most likely won’t do anything. After all, they didn’t promise that they will actually achieve these goals. They only said that they will try. That is the difference between trying and doing.
  • The Ultimate Tester: Sharing Knowledge identifies yet another aspect of ultimate tester (sharing knowledge) and introduces six different ways to share knowledge with other people. I think that sharing knowledge is a crucial step of becoming better at what you do. It doesn’t really matter what you do, but if you want to become better, you should start sharing your knowledge. Blogging has really helped me to learn a lot of new things (you have to check a lot of things when you write a post), but if blogging is not your media, you can get started really easily by sharing one thing with colleagues and asking their opinion about it. It doesn’t take a lot of time, and the odds are that you will learn something new as well.

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 →

0 comments… add one

Leave a Comment