Cargando…

Mastering Unit Testing Using Mockito and JUnit.

In Detail It is insanity to keep doing things the same way and expect them to improve. Any program is useful only when it is functional; hence, before applying complex tools, patterns, or APIs to your production code, checking software functionality is must. Automated JUnit tests help you verify you...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Acharya, Sujoy
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Packt Publishing, 2014.
Temas:
Acceso en línea:Texto completo

MARC

LEADER 00000cam a2200000Ma 4500
001 EBOOKCENTRAL_ocn884551202
003 OCoLC
005 20240329122006.0
006 m o d
007 cr |n|||||||||
008 140725s2014 xx o 000 0 eng d
040 |a IDEBK  |b eng  |e pn  |c IDEBK  |d EBLCP  |d DEBSZ  |d S4S  |d OCLCO  |d YDXCP  |d OCLCQ  |d OCLCF  |d OCLCQ  |d FEM  |d ZCU  |d XFH  |d MERUC  |d OCLCQ  |d ICG  |d AU@  |d OCLCQ  |d DKC  |d OCLCQ  |d OCLCO  |d OCLCQ  |d OCLCO 
019 |a 968063532  |a 969067029  |a 994453213 
020 |a 1306964741  |q (ebk) 
020 |a 9781306964746  |q (ebk) 
020 |a 9781783982516 
020 |a 1783982519 
020 |a 1783982500 
020 |a 9781783982509 
029 1 |a CHNEW  |b 000888205 
029 1 |a CHVBK  |b 374471223 
029 1 |a DEBBG  |b BV043611003 
029 1 |a DEBSZ  |b 410566861 
029 1 |a AU@  |b 000067107942 
035 |a (OCoLC)884551202  |z (OCoLC)968063532  |z (OCoLC)969067029  |z (OCoLC)994453213 
037 |a 627725  |b MIL 
050 4 |a T55.4-60.8 
082 0 4 |a 005.1 
049 |a UAMI 
100 1 |a Acharya, Sujoy. 
245 1 0 |a Mastering Unit Testing Using Mockito and JUnit. 
260 |b Packt Publishing,  |c 2014. 
300 |a 1 online resource 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
347 |a text file  |2 rda 
588 0 |a Print version record. 
520 |a In Detail It is insanity to keep doing things the same way and expect them to improve. Any program is useful only when it is functional; hence, before applying complex tools, patterns, or APIs to your production code, checking software functionality is must. Automated JUnit tests help you verify your assumptions continuously, detect side effects quickly, and also help you save time. This book will provide the skills you need to successfully build and maintain meaningful JUnit test cases. You will begin with how to use advanced JUnit 4 features, improve code coverage, automate JUnit tests, monitor code quality, write JUnit tests for the database and web tier refactor legacy code, mock external dependencies using Mockito, and write testable code using test-driven development. By sequentially working through the steps in each chapter, you will quickly master the advanced JUnit features. Approach 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. Who this book is for 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. 
505 0 |a 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. 
505 8 |a 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. 
505 8 |a 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. 
505 8 |a 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. 
505 8 |a 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. 
546 |a English. 
590 |a ProQuest Ebook Central  |b Ebook Central Academic Complete 
650 0 |a Computer programming. 
650 6 |a Programmation (Informatique) 
650 7 |a computer programming.  |2 aat 
650 7 |a Computer programming  |2 fast 
776 0 8 |i Print version:  |z 9781306964746 
856 4 0 |u https://ebookcentral.uam.elogim.com/lib/uam-ebooks/detail.action?docID=1743826  |z Texto completo 
938 |a ProQuest Ebook Central  |b EBLB  |n EBL1743826 
938 |a ProQuest MyiLibrary Digital eBook Collection  |b IDEB  |n cis28651022 
938 |a YBP Library Services  |b YANK  |n 11986366 
994 |a 92  |b IZTAP