Home » Tag Archives: Testing (page 2)

Tag Archives: Testing

Spark Streaming Testing with Scala Example

apache-spark-logo

Spark Streaming Testing How do you create and automate tests of Spark Streaming applications?  In this post, we’ll show an example of one way in Scala.  This post is heavy on code examples and has the added bonus of using a code coverage plugin. Are the tests in this tutorial examples unit tests?  Or, are they integration tests?  Functional tests? ...

Read More »

JUnit 5 – Conditions

junit-logo

We recently learned about JUnit’s new extension model and how it allows us to inject customized behavior into the test engine. I left you with the promise to look at conditions. Let’s do that now! Conditions allow us to define flexible criteria when tests should or shouldn’t be executed. Their official name is Conditional Test Execution. Overview Other posts in ...

Read More »

Multiple Assertions in a Test are Fine

software-development-2-logo

Intro Oh yes; another article that attempts to defy traditional thinking. First it was that static methods are fine. Then I told you that Singletons are fine. Now, I’m saying a case can be made for multiple assertions in a single test. This will be a short one, too. Why Only One? First, I’ll look at the reasons that people ...

Read More »

JUnit 5 – Architecture

junit-logo

Now that we know how to set JUnit 5 up and write some tests with it, let’s take a look under the covers. In this post we’ll discuss the JUnit 5 architecture and the reasons why it turned out this way. Overview This post is part of a series about JUnit 5: Setup Basics Architecture Conditions Injection … JUnit 4 ...

Read More »

How to Replace Rules in JUnit 5

junit-logo

The recently published JUnit 5 (aka JUnit Lambda) alpha release caught my interest and while skimming through the documentation I noticed that rules are gone – as well as runners and class rules. According to the documentation, these partially competing concepts have been replaced by a single consistent extension model. Over the years, Frank and I wrote several rules to ...

Read More »

Clean architecture of Selenium tests

selenium-logo

In this blog post, I would like to introduce a clean architecture for Selenium tests with best design patterns: page object, page element (often called HTML wrapper) and self-developed, very small but smart framework. The architecture is not restricted to Java which is used in the examples and can be applied to Selenium tests in any other language as well. ...

Read More »

Verifying DateTime and Date with Hamcrest

hamcrest-logo

Since I started diving into automated testing and practicing TDD, verification of date values was pain. Luckily there is nice library for legacy Date and new Java 8 DateTime APIs, which cures this pain. If you belong to healthier part of Java development community and practicing unit testing on daily basis, you probably are aware of Hamcrest Java library. It ...

Read More »

JUnit 5 – Basics

junit-logo

Last week we’ve set up JUnit 5 to be able to write tests. So let’s do it! Overview This post is part of a series about JUnit 5: Setup Basics Architecture Conditions Injection … Most of what you will read here and more can be found in the emerging JUnit 5 user guide. Note that it is based on an ...

Read More »

JUnit 5 – A First Look at the Next Generation of JUnit

junit-logo

In the beginning of February, the JUnit 5 (aka JUnit Lambda) team has published an alpha release. Since JUnit 4 is among the most used items in my toolbox I thought it might be worth to have a look at the next major release. I took the latest build for a spin and noted down the changes that I found noteworthy here. ...

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