Software testing has been evolving very fast over the years, from unit testing (JUnit & TestNG); mocking (Mockito & PowerMock); web UI testing (Selenium); performance and load testing (JMeter); continuous integration testing (Arquillian) to behavior-driven testing (Cucumber). Each testing framework provides its own benefits to various aspects of software quality assurance.

Today, every developer and team leader have to choose some testing frameworks for their projects to increase the quality of software and productivity. Therefore, in this summary article, we carefully pick the latest books (all published in 2013 and 2014) which are written for the most popular testing frameworks, hopefully this list acts as a reference for your decision on choosing the right testing framework for your need.

NOTE: This is a summary article, not a full review. To see detailed reviews, click Read Full Customer Reviews link for each book.

Here’s the list of 9 books written the most popular testing frameworks for Java development.

  1. Mastering Unit Testing Using Mockito and JUnit
  2. Practical Unit Testing with JUnit and Mockito
  3. Mockito Cookbook
  4. Selenium WebDriver Practical Guide Paperback
  5. Performance Testing With JMeter 2.9
  6. TestNG Beginner's Guide
  7. Instant Mock Testing with PowerMock
  8. Arquillian Testing Guide
  9. Instant Cucumber BDD How-to
 

1. Mastering Unit Testing Using Mockito and JUnit

Mastering JUnit and MockitoAuthor: Sujoy Acharya

Publisher: Packt Publishing

Published Date: July 15, 2014

Paperback: 310 pages



Read Full Customer Reviews

Content Coverage:

  • Chapter 1: JUnit - A Total Recall
    • Defining unit testing
    • Working with JUnit 4
    • Working with JUnit 4++
  • Chapter 2: Automating JUnit Tests
    • Continuous Integration
    • Jenkins
  • Chapter 3: Test Doubles
    • Dummy, Stub, Fake, Mock, Spy
  • Chapter 4: Progressive Mockito
    • Working with Mockito
    • Drinking Mockito
  • Chapter 5: Exploring Code Coverage
    • Understanding code coverage
    • Configuring Eclipse plugin
    • Measuring code coverage using Gradle
    • Working with the Maven Cobertura plugin
    • Running the Cobertura Ant task
  • Chapter 6: Revealing Code Quality
    • Understanding the static code analysis
    • Working with the Checkstyle plugin
    • Exploring the FindBugs plugin
    • Working with the PMD plugin
    • Monitoring code quality with SonarQube
    • Getting familiar with false positives
  • Chapter 7: Unit Testing the Web Tier
    • Unit testing servlets
    • Playing with Spring MVC
  • Chapter 8: Playing with Data
    • Separating concerns
    • Unit testing the persistence logic
    • Simplifying persistence with Spring
    • Verifying the system integrity
    • Writing integration tests with Spring
  • Chapter 9: Solving Test Puzzles
    • Working with the legacy code
    • Designing for testability
    • Working with greenfield code
  • Chapter 10: Best Practices
    • Writing meaningful tests
    • Automating JUnit tests
    • Configuring tests
    • Working with assertions
    • Handling exceptions
    • Working with test smells

More information about Mastering Unit Testing Using Mockito and JUnit on Amazon


2. Practical Unit Testing with JUnit and Mockito

Practical Unit TestingAuthor: Tomek Kaczanowski

Publisher: Tomasz Kaczanowski

Published Date: April 23, 2013

Paperback: 402 pages

Read Full Customer Reviews

Content Coverage:

  • I. Developers’ Tests
    • On Tests and Tools
    • Unit Tests
  • II. Writing Unit Tests
    • Unit Tests with no Collaborators
    • Test Driven Development
    • Mocks, Stubs, Test Spies
  • III. Hints and Discussions
    • Things You Should Know
    • Points of Controversy
  • IV. Listen and Organize
    • Getting Feedback
    • Organization of Tests
  • V. Make them Better
    • Maintainable Tests
    • Test Quality
  • A. Automated Tests
    • Wasting Your Time by not Writing Tests
    • When and Where Should Tests Run?
  • B. Running Unit Tests
    • Running Tests with Eclipse
    • Running Tests with IntelliJ IDEA
    • Running Tests with Gradle
    • Running Tests with Maven
  • C. Test Spy vs. Mock
    • Different Flow - and Who Assert?
    • Stop with the First Error
    • Stubbing
    • Forgiveness
    • Different Threads or Containers
    • Conclusions

More information about Practical Unit Testing with JUnit and Mockito on Amazon

 


3. Mockito Cookbook

Mockito CookbookAuthor: Marcin Grzejszczak

Publisher: Packt Publishing

Published Date: June 24, 2014

Paperback: 264 pages

Read Full Customer Reviews

Content Coverage:

  • Chapter 1: Getting Started with Mockito
    • Mockito for JUnit and TestNG
    • Mockito best practices
  • Chapter 2: Creating Mocks
    • Creating mocks in code, with annotations
    • Creating mocks with different default answer
  • Chapter 3: Creating Spies and Partial Mocks
    • Creating spies in code
    • Creating spies with custom configuration
  • Chapter 4: Stubbing Behavior of Mocks
    • Using argument matchers for stubbing
    • Stubbing methods that return values
    • Stubbing methods that they throw exceptions
  • Chapter 5: Stubbing Behavior of Spies
    • Stubbing methods that return values
    • Stubbing void methods
  • Chapter 6: Verifying Test Doubles
    • Verifying the method invocation count with times()
    • Verifying the method invocation count with atLeast()
  • Chapter 7: Verifying Behavior with Object Matchers
    • Using Hamcrest matchers for assertions
    • Creating custom Hamcreast matchers
  • Chapter 8: Refactoring with Mockito
    • Removing the problems with instance creation
    • Refactoring classes that do too much
  • Chapter 9: Integration Testing with Mockito and DI Frameworks
    • Injecting test doubles instead of beans using Spring’s code configuration
    • Injecting test doubles instead of beans using Springockito
  • Chapter 10: Mocking Libraries Comparison
    • Mockito versus EasyMock, JMockit, JMock and Spock

More information about Mockito Cookbook on Amazon


4. Selenium WebDriver Practical Guide Paperback

Seleninum WebDriverAuthor: Satya Avasarala

Publisher: Packt Publishing

Published Date: January 24, 2014

Paperback: 264 pages

Read Full Customer Reviews

Content Coverage:

  • Chapter 1: Introduction to WebDriver and WebElements
    • Understanding the history of Selenium
    • Setting up a project in Eclipse
  • Chapter 2: Exploring Advanced Interactions of WebDriver
    • Understanding actions, build and perform
  • Chapter 3: Exploring the Features of WebDriver
    • Setting the desired capabilities for a browser
    • Taking screenshots
    • Locating target windows and iFrames
    • Exploring Navigate
    • Waiting for WebElements to load
    • Handling cookies
  • Chapter 4: Different Available WebDrivers
    • FirefoxDriver
    • InternetExplorerDriver
    • ChromeDriver
    • SafariDriver
    • OperaDriver
  • Chapter 5: Understanding WebDriver Events
    • Introducing EventFiringWebDriver and EventListener classes
    • Creating an instance of EventListener
    • Exploring different WebDriver event listeners
  • Chapter 6: Dealing with I/O
    • Learning about the FileHandler class
    • Learning about the TemporaryFilesystem class
    • Learning about the Zip class
  • Chapter 7: Exploring RemoteWebDriver and WebDriverBackedSelenium
    • Introducing RemoteWebDriver
    • Understanding the JSON wire protocol
    • Replacing the client library with your own code
    • Exploring WebDriverBackedSelenium
  • Chapter 8: Understanding Selenium Grid
    • Exploring Selenium Grid
    • Understanding the hub
    • Understandind the node
    • Modifying the existing test script to use Selenium Grid
    • Configuring Selenium Grid
  • Chapter 9: Understanding PageObject Pattern
    • Creating test cases for our Wordpress blog
    • What is the PageObject pattern?
    • Good practices for the PageObjects design
    • Understanding loadable components
    • Working on end-to-end example of Wordpress
  • Chapter 10: Testing iOS and Android Apps
    • Different forms of mobile applications
    • Available software tools
    • Automating iOS and Android tests using Appium

More information about Selenium WebDriver Practical Guide on Amazon

 

5. Performance Testing With JMeter 2.9

JMeter Performance TestingAuthor: Bayo Erinle

Publisher: Packt Publishing

Published Date: July 26, 2013

Paperback: 148 pages

Read Full Customer Reviews

Content Coverage:

  • Chapter 1: Performance Testing Fundamentals
    • The incident and aftermath
    • Performance testing and tuning
    • JMeter to the rescue
  • Chapter 2: Recording Your First Test
    • Configuring JMeter HTTP proxy server
    • Setting up your browser to use the proxy server
    • Anatomy of a JMeter test
  • Chapter 3: Submitting Forms
    • Capturing simple forms
  • Chapter 4: Managing Sessions
    • Managing sessions with cookies
    • Managing sessions with URL rewriting
  • Chapter 5: Resource Monitoring
    • Basic server monitoring
    • Monitoring the server with a JMeter plugin
  • Chapter 6: Distributed Testing
    • Remote testing with JMeter
    • Leveraging the cloud for distributed testing
  • Chapter 7: Helpful Tips
    • JMeter properties and variables
    • JMeter functions
    • The Regular Expression tester
    • The Debug sampler
    • Using timers in your test plan
    • The JDBC Request sampler
    • A Dummy sampler
    • The JSON Path Extractor element
    • Handling RESTful web services

More information about Performance Testing With JMeter on Amazon


6. TestNG Beginner's Guide

TestNG Beginner GuideAuthor: Varun Menon

Publisher: Packt Publishing

Published Date: July 26, 2013

Paperback: 276 pages

Read Full Customer Reviews

Content Coverage:

  • Chapter 1: Getting Started
    • Features of TestNG
    • Writing your first TestNG test
  • Chapter 2: Understanding testng.xml
    • Creating a test suite
    • Running testng.xml
  • Chapter 3: Annotations
    • Annotations in TestNG
    • Before and After annotations
  • Chapter 4: Groups
    • Grouping tests
    • Running a TestNG group
  • Chapter 5: Dependencies
    • Dependency test
    • Using regular expression
  • Chapter 6: The Factory Annotation
    • What is factory?
    • First factory test
  • Chapter 7: Parallelism
    • Writing first parallel test
    • Running test methods in parallel
  • Chapter 8: Using Build Tools
    • Build automation
    • Using Ant to run TestNG tests
  • Chapter 9: Logging and Reports
    • Writing your own logger
    • Writing your own reporter
  • Chapter 10: Creating a Test Suite through Code
    • Running TestNG programmatically
    • Parameterization of tests
  • Chapter 11: Migrating from JUnit
    • Running your JUnit tests through TestNG
    • Converting a JUnit test to a TestNG test
  • Chapter 12: Unit and Functional Testing
    • Unit testing with TestNG
    • Assertion with TestNG
  • Pop Quiz Answers

More information about TestNG Beginner's Guide on Amazon

 


7. Instant Mock Testing with PowerMock

PowerMockAuthor: Deep Shah

Publisher: Packt Publishing

Published Date: October 25, 2013

Paperback: 82 pages

Read Full Customer Reviews

Content Coverage:

  • Saying Hello World! (simple)
  • Getting and installing PowerMock (simple)
  • Mocking static methods (simple)
  • Verifying method invocation (simple)
  • Mocking final classes or methods (simple)
  • Mocking constructors (medium)
  • Understanding arguments matchers (medium)
  • Understanding the Answer interface (advanced)
  • Partial mocking with spies (advanced)
  • Mocking private methods (advanced)
  • Breaking the encapsulation (advanced)
  • Suppressing unwanted behavior (advanced)

More information about Instant Mock Testing with PowerMock on Amazon


8. Arquillian Testing Guide

Arquillian Testing GuideAuthor: John D. Ament

Publisher: Packt Publishing

Published Date: April 17, 2013

Paperback: 242 pages

Read Full Customer Reviews

Content Coverage:

  • Chapter 1: The Aliens Have Landed!
    • The progressions of testing
    • What is Arquillian
  • Chapter 2: The Evolution of Testing
    • How did we get here?
    • A jump in technology
  • Chapter 3: Container Testing
    • Containers and deployments
  • Chapter 4: Why Did the Test Fail?
    • Running your tests - the downside
  • Chapter 5: Enriching the Enterprise Test Case
    • Testing the dependency injection
    • Failure scenarios
  • Chapter 6: Arquillian Extensions
    • Extending Arquillian
    • Testing against a database using JPA
  • Chapter 7: Functional Application Testing
    • Functional testing
  • Chapter 8: Service Testing
    • Service testing approaches
  • Chapter 9: Arquillian and OSGi
    • OSGi and Arquillian
  • Chapter 10: ShrinkWrap in Action
    • What is ShrinkWrap?
    • Managing libraries and modules
 

More information about Arquillian Testing Guide on Amazon


9. Instant Cucumber BDD How-to

Cucumber BDDAuthor: Wayne Ye

Publisher: Packt Publishing

Published Date: April 25, 2013

Paperback: 70 pages

Read Full Customer Reviews

Content Coverage:

  • Understanding behavior-driven development (Intermediate)
  • Setting up an environment for Cucumber BDD on Rails (Intermediate)
  • Writing your first Hello World feature (Simple)
  • Learning foundation knowledge and skills (Intermediate)
  • Building a real web application with Cucumber (Intermediate)
  • Mastering pro tips for writing expressive Gherkin (Intermediate)
  • Mastering pro tips for writing good steps (Advanced)
  • Using third-party libraries with Cucumber (Intermediate)

More information about Instant Cucumber BDD How-to on Amazon

 

You may be also interested in:


About the Author:

is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.



Add comment