Top 9 Books for Java Unit Testing Frameworks in 2014
- Details
- Written by Nam Ha Minh
- Last Updated on 15 March 2020   |   Print Email
- Mastering Unit Testing Using Mockito and JUnit
- Practical Unit Testing with JUnit and Mockito
- Mockito Cookbook
- Selenium WebDriver Practical Guide Paperback
- Performance Testing With JMeter 2.9
- TestNG Beginner's Guide
- Instant Mock Testing with PowerMock
- Arquillian Testing Guide
- Instant Cucumber BDD How-to
1. Mastering Unit Testing Using Mockito and JUnit
 Author: Sujoy AcharyaPublisher: Packt PublishingPublished Date: July 15, 2014Paperback: 310 pages
Author: Sujoy AcharyaPublisher: Packt PublishingPublished Date: July 15, 2014Paperback: 310 pages- 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 
 Author: Tomek KaczanowskiPublisher: Tomasz KaczanowskiPublished Date: April 23, 2013Paperback: 402 pagesRead Full Customer ReviewsContent Coverage:
Author: Tomek KaczanowskiPublisher: Tomasz KaczanowskiPublished Date: April 23, 2013Paperback: 402 pagesRead Full Customer ReviewsContent 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
 Author: Marcin GrzejszczakPublisher: Packt PublishingPublished Date: June 24, 2014Paperback: 264 pagesRead Full Customer ReviewsContent Coverage:
Author: Marcin GrzejszczakPublisher: Packt PublishingPublished Date: June 24, 2014Paperback: 264 pagesRead Full Customer ReviewsContent 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
 Author: Satya AvasaralaPublisher: Packt PublishingPublished Date: January 24, 2014Paperback: 264 pagesRead Full Customer ReviewsContent Coverage:
Author: Satya AvasaralaPublisher: Packt PublishingPublished Date: January 24, 2014Paperback: 264 pagesRead Full Customer ReviewsContent 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
 Author: Bayo ErinlePublisher: Packt PublishingPublished Date: July 26, 2013Paperback: 148 pagesRead Full Customer ReviewsContent Coverage:
Author: Bayo ErinlePublisher: Packt PublishingPublished Date: July 26, 2013Paperback: 148 pagesRead Full Customer ReviewsContent 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
 Author: Varun MenonPublisher: Packt PublishingPublished Date: July 26, 2013Paperback: 276 pagesRead Full Customer ReviewsContent Coverage:
Author: Varun MenonPublisher: Packt PublishingPublished Date: July 26, 2013Paperback: 276 pagesRead Full Customer ReviewsContent 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
 Author: Deep ShahPublisher: Packt PublishingPublished Date: October 25, 2013Paperback: 82 pagesRead Full Customer ReviewsContent Coverage:
Author: Deep ShahPublisher: Packt PublishingPublished Date: October 25, 2013Paperback: 82 pagesRead Full Customer ReviewsContent 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
 Author: John D. AmentPublisher: Packt PublishingPublished Date: April 17, 2013Paperback: 242 pagesRead Full Customer ReviewsContent Coverage:
Author: John D. AmentPublisher: Packt PublishingPublished Date: April 17, 2013Paperback: 242 pagesRead Full Customer ReviewsContent 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
 Author: Wayne YePublisher: Packt PublishingPublished Date: April 25, 2013Paperback: 70 pagesRead Full Customer ReviewsContent Coverage:
Author: Wayne YePublisher: Packt PublishingPublished Date: April 25, 2013Paperback: 70 pagesRead Full Customer ReviewsContent 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:
- Top 7 Books for Java Build Tools in 2014
- Top 8 Books for Java Web Frameworks in 2014
- Top 9 Books for Java Application Servers
- Top 7 Java 8 Books in 2014
- Most Recommended Core Java Books for Serious Developers
About the Author:
 Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.
Comments