Home » Tag Archives: Testing (page 20)

Tag Archives: Testing

Introduction To JUnit Theories

Have you ever read a mathematical theory? It typically reads something like this: For all a, b > 0  the following is true: a+b > a and a+b > b Just typically the statements are more difficult to understand. There is something interesting about this kind of statement: It holds for EVERY element (or combination of elements) of a rather ...

Read More »

Adding Social Sign In to a Spring MVC Web Application: Unit Testing


Spring Social 1.0 has a spring-social-test module which provides support for testing Connect implementations and API bindings. This module was removed from Spring Social 1.1.0, and it was replaced with the Spring MVC Test framework. The problem is that there is practically no information about writing unit tests for an application which uses Spring Social 1.1.0. This blog post fixes ...

Read More »

Attitudes of a Great Software Tester

In my previous post, I explained in my own words the “Attitude of a Great Software Developer“.  This post will focus on the testers.  Developers and Testers are two great personalities that work literally in the opposite direction but towards a common goal of producing good quality software.  One deals with the making aspect of the software and other with ...

Read More »

Parameterized JUnit tests with JUnitParams

Parameterized unit tests are used to to test the same code under different conditions. Thanks to parameterized unit tests we can set up a test method that retrieves data from some data source. This data source can be a collection of test data objects, external file or maybe even a database. The general idea is to make it easy to ...

Read More »

Run, JUnit! Run!!!

JUnit together with JavaScript and SVN are some of the technologies that programmers often start using without even reading a single blog post let alone a book.  Maybe this is a good thing since they look simple enough and understandable so we can use them right away without any manuals, but this also means that they are also underused. In ...

Read More »

Hibernate Facts: Integration testing strategies

I like Integration Testing, it’s a good way to check what SQL queries Hibernate generates behind-scenes. But Integration Tests require a running database server, and this is the first choice you have to make. 1. Using a production-like local database server for Integration Testing For a production environment I always prefer using incremental DDL scripts, since I can always know ...

Read More »

Acceptance Testing: Blaming the Tools

About 5 years ago I was on a project to build a system for collateral management. The system was connected to a large financial network, and got its instructions through standardized financial messages. This project was run in waterfall style, with lots of restrictions on collaboration between disciplines. Without to digress in details on this, I do still think it’s ...

Read More »

Using Matchers in Tests

Gone are the days when we were forced to write way too many assertion lines in our testing code. There is a new sheriff in town: assertThat and his deputy: the matchers. Well, not that new, but anyway I’d like to present to you shortly how matchers are used and after that an extension to matchers concept that I found ...

Read More »

Integration tests with Maven 3, Failsafe and Cargo plugin

Unit testing is available in Maven out of the box. Because of that very often its used for integration tests as well. Major disadvantage of this is that integration tests can take much more time to execute and because no one likes to wait long time every build – tests are just skipped with -Dmaven.test.skip=true flag In order to execute ...

Read More »

JBoss Drools unit testing with junit-drools

Recently I’ve been working with a project heavily using JBoss Drools. I am not Drools expert – I am not also very convinced to this framework, or maybe only to particular use case in this project – and I found it quite difficult to write simple, maintainable unit tests for Drools based business rules. That’s how junit-drools was born – ...

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