DEV Community

Discussion on: How to improve Java Unit Testing Skills to a more advanced level?

Collapse
 
zaerald profile image
Zaerald

Agreed on all the principles, and I want to take action to improve my testing skills.

Testing really is something that takes practice. The more tests you write, the better you'll become.

Do you have a recommendation for my next steps? A practical step to efficiently practice? What I currently do is look for open source projects and read on how they test but it feels like it's a passive thing to do, so I want to explore different paths I can take to actively practice and if I failed to create a test for something, I can look and see some solution.

Collapse
 
khmarbaise profile image
Karl Heinz Marbaise

I can recommend to try some code katas or very simple things like write a fraction class and try to use tests to implement it. It's very helpful and see how testing and implementing works in combination. Yeah it sounds useless to write such a class...but it helps practicing writing tests etc. because the problem domain is (more or less) simple....

Another level of going is to follow the principles of Kent Beck (read the book and try to write the previously mentioned Fraction class by using the TDD principles and of course practice, practice, practice....

Thread Thread
 
zaerald profile image
Zaerald

Awesome! Will try out those code katas 💪