Home » Tag Archives: Testing (page 3)

Tag Archives: Testing

It’s All About Tests – Part 3

software-development-2-logo

In the previous two posts I discussed mostly about the philosophy and attitude of developing with testing. In this post I give some tips and tools examples for testing. Tools JUnit http://junit.org/ There’s also TestNG, which is great tool. But I have much more experience with JUnit so I will describe this framework.   Use the latest version. Know your ...

Read More »

Unit Testing exercise with FizzBuzz and Mockito

mockito-logo

I sometimes use FizzBuzz to demonstrate the basics of unit testing to newbies. Although FizzBuzz is really simple problem, it can also be used to demonstrate more advanced unit testing techniques like mocking. The FizzBuzz Kata: “Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for ...

Read More »

It’s All About Tests – Part 2

java-logo

This is the second post of the series about testing. In the first part I explained about the mindset we need to have while developing with tests. Or, in better words, developing for testable code. In this part I will cover some techniques for testing approach. The techniques I will describe can be seen as how to transform the mindset ...

Read More »

It’s All About Tests – Part 1

java-logo

This post is the first of a series of three. Mindset of testing Techniques Tools and Tips The Mindset Testing code is something that needs to be learned. It takes time to absorb how to do it well. It’s a craft that one should always practice and improve.   Back in the old days, developers did not test, they checked ...

Read More »

Unit Testing exercise with FizzBuzz and JUnitParams

junit-logo

I sometimes use FizzBuzz to demonstrate the basics of unit testing to newbies. Although FizzBuzz is really simple problem, it can also be used to demonstrate more advanced unit testing techniques like implementing parametrized tests. One of the possible solutions to FizzBuzz is:             public class FizzBuzz { private static final int THREE = 3; ...

Read More »

OSGi Testsuite: Introducing Classname Filters

java-interview-questions-answers

OSGi Testsuite is a JUnit test-runner that collects dynamically test classes for execution. It has been published by my fellow Rüdiger about a year ago and proven useful in some projects already. However for gonsole we had to use an ugly patch because version 1.0 only supported .*Test postfix matching for test class names. I solved this problem with version ...

Read More »

Legacy Code to Testable Code #6: Add Overload

software-development-2-logo

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing tests for legacy code, and how they make our life easier. In the last post, I’ve talked about Extract Class, and that sometimes in order to do that, we might want to change the signature of a ...

Read More »

Clean Unit Test Patterns – Presentation Slides

java-logo

I was given the opportunity to talk at the GDG DevFestKarlsruhe 2014 conference about ‘Clean Unit Test Patterns’. Thanks to the organizers for inviting me and thanks to all people listening to my talk. As promised I shared the presentation e.g. for those who want to have a look at the additional slides I did not cover during the talk: ...

Read More »

Legacy Code to Testable Code #5: Extract Class

software-development-2-logo

This post is part of the “Legacy Code to Testable Code” series. In the series we’ll talk about making refactoring steps before writing tests for legacy code, and how they make our life easier. A few years ago I got this from Erik Talboom: “A private method is a design smell”. It took me a while to fully understand it ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close