Home » Tag Archives: Testing (page 10)

Tag Archives: Testing

Java EE7 and Maven project for newbies – part 6

java-interview-questions-answers

Resuming from the previous parts Part #1, Part #2, Part #3, Part #4, Part #5 In the previous post (part 5), we discovered how we can unit test using Arquillian, our EJB services, deploying them in a ‘real’ instance of Wildfly8.1 application server. Extending the previous example we will add some more configuration and code, so that we can add ...

Read More »

Test Data Builders and Object Mother: another look

java-logo

Constructing objects in tests is usually a painstaking work and usually it produces a lot of repeatable and hard to read code. There are two common solutions for working with complex test data: Object Mother and Test Data Builder. Both has advantages and disadvantages, but (smartly) combined can bring new quality to your tests. Note: There are already many articles ...

Read More »

Continuous Delivery: Unit Tests

jenkins-logo

In the previous article we explored static analysis as one of the first steps in Continuous Delivery. Our journey will continue with unit tests. Unit Tests Unit tests are probably the most important part of Continuous Delivery. While unit tests cannot substitute integration and functional tests, they are very easy to write and should be very fast to execute. As ...

Read More »

No SRP? No TDD!

software-development-2-logo

I’ve been thinking about what makes TDD fail, and there are obviously few reasons that were discussed to death (Get it? Dead? TDD? Ok, let’s move on). There’s a pattern I see when working with beginners. I’m talking about TDD beginners, because these people may have years of experience on them.  They follow the red-green steps religiously, and do minimal ...

Read More »

Writing Clean Tests – Divide and Conquer

junit-logo

A good unit test should fail for only one reason. This means that a proper unit test tests only one logical concept. If we want to write clean tests, we have to identify those logical concepts, and write only one test case per logical concept. This blog post describes how we can identify the logical concepts found from our tests, ...

Read More »

Testing effectively

software-development-2-logo

Recently, there was a heaty debate regarding TDD which started by DHH when he claimed that TDD is dead. This ongoing debate managed to capture the attention of developers world, including us. Some mini debates have happened in our office regarding the right practices to do testing. In this article, I will present my own view.   How many kinds ...

Read More »

Writing Clean Tests – New Considered Harmful

java-interview-questions-answers

It is pretty hard to figure out a good definition for clean code because everyone of us has our own definition for the word clean. However, there is one definition which seems to be universal: Clean code is easy to read. This might come as a surprise to some of you, but I think that this definition applies to test ...

Read More »

Spice up your test code with custom assertions

java-logo

Inspired by the @tkaczanowski talk during GeeCON conference I decided to have a closer look at custom assertions with AssertJ library. In my ‘Dice’ game I created a ‘Chance’ that is any combination of dice with the score calculated as a sum of all dice. This is relatively simple object:             class Chance implements Scorable ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.