Home » Tag Archives: Testing (page 3)

Tag Archives: Testing

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 »

Why do we mock?

software-development-2-logo

I do Java interviews. During the interviews I ask technical question that I know the answer for. You may think this is boring. To be honest: sometimes it is. But sometimes it is interesting to learn what misconcepts there are. I happened to ask during the interview what you can read in the title: “Why do we mock?”. The answer ...

Read More »

Checking Sanity in TDD Testing

software-development-2-logo

Whether you’re in the process of fully adopting Test Driven Development (TDD), providing unit tests after you have written your code, or something in between, the question that you will soon ask is: “What should I be testing?” The simplest answer to me is: any place where you can isolate and test just your code. In my opinion, Test-Driven Development ...

Read More »

Unit test life?

software-development-2-logo

You can not program without testing. You write unit tests first and then you write your code. (Well, I know you don’t but just let’s focus on best practice.) When there is an error in the code, first you write a new unit test that demonstrates the bug and then you fix it. After the unit test runs fine the ...

Read More »

It’s All About Tests – Part 3

software-development-2-logo

In the previous two posts I discussed mostly about the philosophy and attitude of developing with testing. In this post I give some tips and tools examples for testing. Tools JUnit http://junit.org/ There’s also TestNG, which is great tool. But I have much more experience with JUnit so I will describe this framework.   Use the latest version. Know your ...

Read More »

Unit Testing exercise with FizzBuzz and Mockito

mockito-logo

I sometimes use FizzBuzz to demonstrate the basics of unit testing to newbies. Although FizzBuzz is really simple problem, it can also be used to demonstrate more advanced unit testing techniques like mocking. The FizzBuzz Kata: “Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for ...

Read More »

It’s All About Tests – Part 2

java-logo

This is the second post of the series about testing. In the first part I explained about the mindset we need to have while developing with tests. Or, in better words, developing for testable code. In this part I will cover some techniques for testing approach. The techniques I will describe can be seen as how to transform the mindset ...

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