When you perform unit testing, there are many situations where you don’t have the full code or the right context that is needed to execute it. It might be that part of the code is not written yet or that you interact with an external system that is difficult to access or you don’t want to impact with unit tests. In these cases, you need to create a test double, an object that behaves like its production equivalent. In this article, Michał Lipski describes three types of test doubles – fake, stub and mock – and gives you examples when to use them in your unit testing.
Tutorials and resources on how to apply unit testing in software testing
Mockito is a popular and powerful open source Java mocking framework. In order to achieve good unit tests, you need to make use of mocks and stubs. And that’s exactly what this talk will be about: What is a mock?
Rules have disappeared in the version 5 of the JUnit open source Java testing tools. The release 5 of JUnit is still in alpha status. In this article, Herrmann Rüdiger explores what it would take to transform existing rules to the new concept so that they could run natively on JUnit 5.
End-to-end testing (or system testing) tests a completely integrated system to verify that it meets its requirements. In a blog post, Mike Wacker from Google explains why if this testing strategy sounds good in theory, it goes wrong in practice.