My Account Log in

4 options

Mastering unit testing using Mockito and JUnit : an advanced guide to mastering unit testing using Mockito and JUnit / Sujoy Acharya.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central Academic Complete Available online

View online

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Acharya, Sujoy, author.
Series:
Community experience distilled.
Community Experience Distilled
Language:
English
Subjects (All):
Computer programming.
Physical Description:
1 online resource (314 p.)
Edition:
1st edition
Other Title:
An advanced guide to mastering unit testing Mockito and JUnit
Place of Publication:
Birmingham, England : Packt Publishing, 2014.
Language Note:
English
System Details:
text file
Biography/History:
Acharya Sujoy: Sujoy Acharya works as a Principal Engineer with Cerner. While growing up, he pursued his interests in the fields of computer science and engineering. His hobbies are watching movies and sitcoms, playing outdoor sports, and reading books. Sujoy likes to research upcoming technologies. His major contributions are in the fields of TDD, building scalable applications, cloud services, and the Spring Framework. He has authored four books for Packt, namely, Test-Driven Development with Mockito, Mastering Unit Testing using Mockito and JUnit, Mockito Essentials, and Mockito for Spring.
Summary:
A practical and easy-to-follow, yet comprehensive, guide to learning advanced JUnit testing. Each topic is explained and placed in context, and for the more inquisitive, there are more details of the concepts used. This book is for you if you are a developer with some experience in Java application development as well as a basic knowledge of JUnit testing. But for those whose skill set is void of any prior experience with JUnit testing, the book also covers basic fundamentals to get you acquainted with the concepts before putting them into practise.
Contents:
Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: JUnit 4 - A Total Recall; Defining unit testing; Working with JUnit 4; Setting up Eclipse; Running the first unit test; Exploring annotations; Verifying test conditions with Assertion; Working with exception handling; Exploring the @RunWith annotation; Working with JUnit 4++; Ignoring a test; Executing tests in order; Learning assumptions; Exploring test suite; Asserting with assertThat; Comparing matchers - equalTo, is, and not
Working with compound value matchers - either, both, anyOf, allOf, and notWorking with collection matchers - hasItem, and hasItems; Exploring string matchers - startsWith, endsWith, and containsString; Exploring built-in matchers; Building a custom matcher; Creating parameterized tests; Working with parameterized constructors; Working with parameterized methods; Giving a name; Working with timeouts; Exploring JUnit theories; Externalizing data using @ParametersSuppliedBy and ParameterSupplier; Dealing with JUnit rules; Playing with the timeout rule; Working with the ExpectedException rule
Unfolding the TemporaryFolder ruleExploring the ErrorCollector rule; Working with the Verifier rule; Learning the TestWatcher rule; Working with the TestName rule; Handling external resources; Exploring JUnit categories; Summary; Chapter 2: Automating JUnit Tests; Continuous Integration; Benefits of CI; Gradle automation; Getting started; Gradling; Gradle plugins; Maven project management; Installation; The Archetype plugin; The Project Object Model (POM) file; Project dependency; The build life cycle; The clean life cycle; The site life cycle; Another Neat Tool (ANT); Jenkins
The Gradle projectThe Maven project; Building the Ant project; Summary; Chapter 3: Test Doubles; Dummy; Stub; Fake; Mock; Spy; Summary; Chapter 4: Progressive Mockito; Working with Mockito; Why should you use Mockito?; Qualities of unit testing; Drinking Mockito; Configuring Mockito; Mocking in action; Mocking objects; Stubbing methods; Verifying the method invocation; Using argument matcher; Throwing exceptions; Stubbing consecutive calls; Stubbing with an Answer; Spying objects; Stubbing void methods; Capturing arguments with ArgumentCaptor; Verifying the invocation order
Changing the default settingResetting mock objects; Exploring Mockito annotations; Working with inline stubbing; Determining mocking details; Behavior-driven development with Mockito; Writing tests in BDD style; The BDD syntax; Summary; Chapter 5: Exploring Code Coverage; Understanding code coverage; Learning the inner details of code instrumentation; Configuring the Eclipse plugin; Uncovering the Clover plugin; Working with the EclEmma plugin; Examining the eCobertura plugin; Measuring coverage using Gradle; Working with the Maven Cobertura plugin; Running the Cobertura Ant task; Summary
Chapter 6: Revealing Code Quality
Notes:
Includes index.
Description based on online resource; title from PDF title page (ebrary, viewed July 23, 2014).
ISBN:
9781783982516
1783982519
OCLC:
884551202

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account