Home » Tag Archives: Testing (page 5)

Tag Archives: Testing

Use JUnit’s expected exceptions sparingly

Sometimes, when we get pull requests for jOOQ or our other libraries, people change the code in our unit tests to be more “idiomatic JUnit”. In particular, this means that they tend to change this (admittedly not so pretty code): @Test public void testValueOfIntInvalid() { try { ubyte((UByte.MIN_VALUE) - 1); fail(); } catch (NumberFormatException e) {} try { ubyte((UByte.MAX_VALUE) + ...

Read More »

Testing: Appetite Comes With Eating

I’ve written a lot about testing. Some tips on integration tests, some how-tos, some general opinions about tests. But I haven’t told my “personal story” about testing. Why are tests needed should be obvious by now. It’s not all about finding bugs (because then you can use an excuse like “QAs will find them anyway”), it’s about having a codebase ...

Read More »

Container Object pattern. A new pattern for your tests.

java-interview-questions-answers

If you search for a description of what Page Object is, you’ll find that The Page Object Pattern gives us a common sense way to model content in a reusable and maintainable way. And also points that: Within your web app’s UI there are areas that your tests interact with. A Page Object simply models these as objects within the ...

Read More »

Effective UI tests with Selenide

Waiting for miracles Christmas is a time for miracles. On the eve of the new year we all build plans for the next. And we hope that all problems will leave in the ending year, and a miracle happens in the coming year. Every Java developer dreams about a miracle that lets him become The Most Effective Java Developer in ...

Read More »

Testing multithreaded code in Java

Testing multithreaded code is a tough challenge. The first advice that you get when trying to test concurrency is to isolate your concurrent concerns in the code as much as possible. This a general design advice but in this case it’s even more important. Make sure to first properly unit test the logic that is wrapped by the concurrent construct. ...

Read More »

Writing BDD tests with Cucumber JVM

Cucumber JVM as an excellent tool to write your BDD tests.In this article I would like to give an introduction to BDD with Cucumber JVM. Let’s get started… What is BDD?           In a nutshell, BDD tries to solve the problem of “understanding requirements with examples” BDD tools There are lot of tools available for BDD ...

Read More »

Introduction in Java TDD – part 2

Hello again! In the previous blog post I explained TDD theory in general, without close reference to Java, but in this part we start a TDD practice. Our goal is to go through all phases of TDD: from requirement analysis to refactoring of tested code. All this we will do on example with Java, JUnit and ‘fake’ requirements. Requirements analysis ...

Read More »

Introduction in Java TDD – part 1

Welcome to an introduction in Test Driven Development (TDD) series. We will talk about Java and JUnit in context of TDD, but these are just tools. The main aim of the article is to give you comprehensive understanding of TDD regardless of programming language and testing framework. If you don’t use TDD in your project you are either lazy or ...

Read More »

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 »

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