Home » Tag Archives: Testing (page 4)

Tag Archives: Testing

Enterprise Spring examples and integration tests

spring-interview-questions-answers

There was longer gap in my blog, because I was busy writing book Pivotal Certified Spring Enterprise Integration Specialist Exam – A Study Guide. This book is example heavy. Fortunately Apress agreed to open source all these examples. Therefore there is quite extensive collection of Spring examples available in this GitHub repository. Altogether  146 Spring examples with integration tests. Most of ...

Read More »

Hamcrest matchers tutorial

mockito-logo

This article is part of our Academy Course titled Testing with Mockito. In this course, you will dive into the magic of Mockito. You will learn about Mocks, Spies and Partial Mocks, and their corresponding Stubbing behaviour. You will also see the process of Verification with Test Doubles and Object Matchers. Finally, Test Driven Development (TDD) with Mockito is discussed ...

Read More »

Custom Hamcrest Matchers

mockito-logo

This article is part of our Academy Course titled Testing with Mockito. In this course, you will dive into the magic of Mockito. You will learn about Mocks, Spies and Partial Mocks, and their corresponding Stubbing behaviour. You will also see the process of Verification with Test Doubles and Object Matchers. Finally, Test Driven Development (TDD) with Mockito is discussed ...

Read More »

Mockito Verification

mockito-logo

This article is part of our Academy Course titled Testing with Mockito. In this course, you will dive into the magic of Mockito. You will learn about Mocks, Spies and Partial Mocks, and their corresponding Stubbing behaviour. You will also see the process of Verification with Test Doubles and Object Matchers. Finally, Test Driven Development (TDD) with Mockito is discussed ...

Read More »

Mocks, Spies, Partial Mocks and Stubbing

mockito-logo

This article is part of our Academy Course titled Testing with Mockito. In this course, you will dive into the magic of Mockito. You will learn about Mocks, Spies and Partial Mocks, and their corresponding Stubbing behaviour. You will also see the process of Verification with Test Doubles and Object Matchers. Finally, Test Driven Development (TDD) with Mockito is discussed ...

Read More »

Getting started with Mockito

mockito-logo

This article is part of our Academy Course titled Testing with Mockito. In this course, you will dive into the magic of Mockito. You will learn about Mocks, Spies and Partial Mocks, and their corresponding Stubbing behaviour. You will also see the process of Verification with Test Doubles and Object Matchers. Finally, Test Driven Development (TDD) with Mockito is discussed ...

Read More »

Mockito Tutorial: Testing and Mocking with Mockito

mockito-logo

Course Overview Mockito is an open source testing framework for Java released under the MIT License.The framework allows the creation of test double objects (mock objects) in automated unit tests for the purpose of Test-driven Development (TDD) or Behavior Driven Development (BDD). As the official documentation states: “Mockito is a mocking framework that tastes really good. It lets you write ...

Read More »

Test Doubles: mocks, dummies and stubs

junit-logo

Most classes have collaborators. When unit testing, you usually want to avoid using real implementations of those collaborators to avoid test brittleness and binding/coupling, and instead use Test Doubles: Mocks, Stubs and Doubles. This article references two existing articles on the subject: Mocks Aren’t Stubs, by Martin Fowler and The Little Mocker, by “Uncle” Bob Martin. I recommend them both. Terminology I am going to ...

Read More »

Smart package structure to improve testability

java-logo

There are many ways of dividing whole application into packages. Discussions about pros and cons of packaging by feature or by layer can we found on many programming blogs and forums. I want to discuss this topic starting from testability and see if it will drive to any meaningful result. At the beginning let’s try to describe what we usually ...

Read More »

Testing Asynchronous Code

scala-logo

Asynchronous code is hard. Everyone knows that. Writing asynchronous tests is even harder. Recently I fixed a flaky test and I want to share some thoughts about writing asynchronous tests. In this post we explore a common problem with asynchronous tests—how to force a test to take a specific ordering between threads, and forcing some operations by some threads to ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns