Home » Tag Archives: Testing (page 2)

Tag Archives: Testing

Challenging Myself With Coplien’s Why Most Unit Testing is Waste

software-development-2-logo

James O. Coplien has written in 2014 the thought-provoking essay Why Most Unit Testing is Waste and further elaborates the topic in his Segue. I love testing but I also value challenging my views to expand my understanding so it was a valuable read. When encountering something so controversial, it’s crucial to set aside one’s emotions and opinions and ask: “Provided ...

Read More »

Testing System.in and System.out with system-rules

java-logo

Writing unit tests is an integral part of software development. One problem you have to solve when your class under test interacts with the operating system, is to simulate its behaviours. This can be done by using mocks instead of the real objects provided by the Java Runtime Environment (JRE). Libraries that support mocking for Java are for example mockito ...

Read More »

Separating Integration Tests from Unit Tests Using Maven Failsafe & JUnit @Category

apache-maven-logo

Why Unit Tests Should Run Separately From Integration Tests TDD at the Unit Testing level is fairly straight-forward, since classes in unit testing either do not have complex dependencies, or you mock-out the dependencies with a mocking framework (ex. Mockito). However, TDD quickly becomes difficult when we get to Integration Testing. Integration Testing is basically testing a component with some or all ...

Read More »

Given When Then in Java

junit-logo

tl;dr you can use labels to clarify a given-when-then style of testing. What is given-when-then? given-when-then is a commonly used style of specifying system behaviour in which your tests are split into three sections. Given is the section that lays out the pre-conditions for the test, ie whatever state you’re assuming the world to be in before you start. The ...

Read More »

Advanced Creation of Hamcrest Matchers

hamcrest-logo

Intro Last time, I went over what a Hamcrest Matcher was, how it’s used, and how to make one. In this article, I will explain more advanced steps in the creation of Hamcrest Matchers. First, I’ll share how to make your matchers more easily type-safe, then some techniques for stateless Matchers, then finally how to cut down on so many ...

Read More »

Redesigning Hamcrest

hamcrest-logo

I’ve done a few posts on the Hamcrest library, and I really do enjoy using it, but there are a few changes I would love to make to it. I understand most of the design decisions that they made, but I think some of them weren’t really worth it. Introducing Litecrest Most of the changes I would make to the ...

Read More »

Testing with files and directories in JUnit with @Rule

junit-logo

Testing with Files and directories in JUnit is easy thanks to TemporaryFolder @Rule. In JUnit rules (@Rule) can be used as an alternative or an addition to fixture setup and cleanup methods (org.junit.Before, org.junit.After, org.junit.BeforeClass, and org.junit.AfterClass), but they are more powerful, and can be more easily shared between projects and classes. The code to be tested   public void ...

Read More »

Book Review: Mockito Essentials

mockito-logo

The subtitle of Sujoy Acharya‘s Mockito Essentials (Packt Publishing, October 2014) is: “A practical guide to get you up and running with unit testing using Mockito.” The Preface and seven chapters in Mockito Essentials span approximately 190 substantive pages. Preface In the Preface, author Sujoy Acharya writes that Mockito Essentials “is an advanced-level guide that will help software developers to ...

Read More »

How to perform client side web performance testing in JMeter?

apache-jmeter-logo

In this article we will see how can we do client side performance testing using Jmeter Plugins. I will be using jmeter webdriver plugins. Before starting this topic, please have some basic information on client side performance testing from my previous post. So, lets get started:         Installation Install Jmeter and Plug ins from below links following ...

Read More »

Testing JVM server-side JavaScript with Jasmine, Spock and Nashorn

java-logo

JavaScript usage is not limited to client-side code in browser or NodeJS powered server-side code. Many JVM based projects are using it as internal scripting language. Testing this sort of functionality is neither straightforward nor standard. In this post I intend to demonstrate an approach for testing JavaScript in server-side JVM environment using mature tools like Jasmine, Spock and Nashorn. ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close