What you will learn in Test Driven: Practical TDD and Acceptance TDD for Java Developers
Practical TDD and Acceptance TDD for Java Developers
Chapter by chapter
Chapter 1: Chapter 1. The big picture
Introduces test-driven development as a test-first approach to guiding implementation and design.
What you learn in chapter 1 →Chapter 2: Chapter 2. Beginning TDD
This introduction recaps the test-code-refactor cycle and its benefits before the chapter’s practical TDD example.
What you learn in chapter 2 →Chapter 3: Chapter 3. Refactoring in small steps
The introduction frames a template-engine design problem and defines a spike as throwaway prototyping used to explore a potential solution.
What you learn in chapter 3 →Chapter 4: Chapter 4. Concepts and patterns for TDD
The chapter introduction previews TDD techniques, testing concepts, testable design, unit-testing patterns, and work with legacy code.
What you learn in chapter 4 →Chapter 5: Chapter 5. Test-driving web components
The introduction frames test-driving Java EE web components as a practical challenge and previews approaches for controllers, views, and component-based frameworks.
What you learn in chapter 5 →Chapter 6: Chapter 6. Test-driving data access
The introduction motivates test-driving data access by highlighting the importance of persistent data, the shortcomings of manual inspection, and the gap left by faking persistence in business-logic tests.
What you learn in chapter 6 →Chapter 7: Chapter 7. Test-driving the unpredictable
This introduction previews the challenges of test-driving time-dependent and multithreaded Java code.
What you learn in chapter 7 →Chapter 8: Chapter 8. Test-driving Swing
The introduction frames the challenge of choosing what to test-drive in a Swing GUI, where behavior is only one aspect of design.
What you learn in chapter 8 →Chapter 9: Chapter 9. Acceptance TDD explained
The introduction contrasts TDD’s focus on technical quality with acceptance TDD’s focus on delivering functionality that meets customer and business needs.
What you learn in chapter 9 →Chapter 10: Chapter 10. Creating acceptance tests with Fit
The chapter introduces Fit as a framework for collaborative, automated acceptance testing and previews its concepts and use.
What you learn in chapter 10 →Chapter 11: Chapter 11. Strategies for implementing acceptance tests
The introduction frames acceptance-test implementation as a choice between testing the whole system and testing at lower levels, considering cost versus value.
What you learn in chapter 11 →Chapter 12: Chapter 12. Adopting TDD
This introduction frames TDD adoption as both a personal change and a process of bringing colleagues aboard.
What you learn in chapter 12 →Concepts explained in this book
- test-driven developmentTest-driven development is a software development technique in which tests are written before the code they guide and verify.
- acceptance test-driven developmentAcceptance test-driven development is a practice in which acceptance tests guide implementation of system behavior.
- acceptance testingAcceptance testing is the process of checking whether a system satisfies conditions for acceptance by its stakeholders.
- refactoringA disciplined technique for changing a program's internal structure without changing its observable behavior.
- Hibernate sessionA Hibernate Session is an interface for interacting with a database and managing persistent objects within a persistence context.
- end-to-end testingEnd-to-end testing checks a system's behavior through its external interfaces across the interactions needed to deliver a feature.
- test doubleA test double is a substitute for a real collaborator used to provide controlled or recorded interactions in a test.
- resistance to changeResistance to change is reluctance or opposition to adopting a proposed change.
- software testingSoftware testing is the evaluation of software to identify defects or assess whether it behaves as expected.
- integration testAn integration test checks whether multiple software components work together correctly.
- dependency injectionDependency injection is a software design pattern in which an object receives its dependencies from an external source rather than obtaining them itself.
- HibernateHibernate is a Java object-relational mapping framework that maps Java objects to relational database structures and supports their persistence.
- SessionFactorySessionFactory is a Hibernate interface that creates and provides database sessions.
- fixture tableA fixture table is a table in a Fit test document that specifies test inputs, actions, or expected results for a fixture to process.
- servletA Java Servlet is a Java component that handles requests and generates responses within a web application.
- programming by intentionProgramming by intention is a technique of writing code as if another piece of code already exists, focusing on the desired use rather than current implementation constraints.
- FITFit is an acceptance-testing framework that expresses tests and expected results in tables.
- self-shuntSelf-shunt is a testing pattern in which the test object also serves as a test double for a collaborator.
- Fit fixtureA Fit fixture is a class that interprets a table-based test and connects it to the software being tested.
- continuous planningAn ongoing planning practice that prepares and refines work for upcoming iterations while the current iteration is underway.
- story splittingStory splitting divides a user story into smaller stories that can be implemented separately.
- automated testingAn automated test is a software test executed by a computer according to predefined instructions rather than performed manually.
- component hierarchyA component tree is the hierarchical arrangement of nested user-interface components that make up a page or interface.
- extra constructorA test pattern that adds a constructor accepting substitute dependencies so a class can be instantiated for testing.
- intimate inner classA test pattern in which an inner class shares fields with its surrounding test class to support testing.
- parameterized testingA test pattern in which one test method applies the same test logic to multiple data sets supplied as parameters.
- privileged accessA test pattern that accesses or modifies private state to make legacy code testable.
- test-specific subclassA test pattern that creates a subclass to expose or modify behavior or state for testing.
- thread safetyThread safety is the property of software that behaves correctly when accessed by multiple threads concurrently.
- datasetA dataset is a collection of related data values treated together for comparison or analysis.
- Fit test documentA Fit test document contains tables that specify examples and expected results for execution by Fit.
- interaction testingInteraction-based testing verifies behavior by checking interactions between the system under test and its collaborators.
- dependent testA test whose execution or expected outcome depends on state or results produced by another test.
- parallel test executionThe concurrent execution of multiple software tests across available computing resources.
- soft bootA minimal system-reset operation that restores a system to a known state without performing a full restart.
- unit testUnit testing is the practice of checking individual units of code, typically in isolation.
- continuous integrationA software development practice of integrating changes into a shared source repository frequently and verifying the integrated code, typically with automated tests.
- Apache WicketApache Wicket is an open-source Java web application framework for building applications from reusable components and markup templates.
- AbbotAbbot is a Java GUI testing framework for automating tests of graphical applications, including Swing applications.
- embedded testA test that is placed and executed within the application process rather than solely from an external test process.
- test-selection strategyA test-selection strategy is a method for deciding which tests to write for a software system or feature.
- testing hookAn access point exposed by an application to let tests locate, operate on, or inspect its UI, logic, or state.
- JdbcTemplateJdbcTemplate is a Spring Framework class that provides higher-level JDBC operations while managing repetitive data-access and resource-handling tasks.
- crawling under the skinCrawling under the skin is an acceptance-testing strategy that bypasses a system’s concrete user interface to test through an abstract interface or internal functionality.
- user storyA user story is a concise description of a software requirement from the perspective of a user or customer.
- constructor injectionA form of dependency injection in which dependencies are supplied through an object's constructor.
- custom argument matchingCustom argument matching is a technique for checking method-call arguments with criteria other than the arguments' default equality comparison.
- incremental developmentIncremental development is a software development approach that builds and delivers a product in successive increments.
- model-view-presenterModel-View-Presenter is a user-interface design pattern that separates responsibilities among a model, a view, and a presenter.
- code duplicationCode duplication is the repetition of the same or similar code in multiple places in a software system.
- Wicket componentA Wicket component is a dynamic element on a web page represented by a Java class.
- WicketTesterWicketTester is a Wicket testing utility for running pages and components outside a web container.
- fake instanceA fake is a test double with a simplified working implementation that substitutes for a real collaborator.
- stubA stub is a test double that supplies predetermined responses to calls made by the system under test.
- JemmyJemmy is a Java GUI testing tool for automating interaction with user-interface components, including Swing components.
- JDBCJDBC is Java's standard API for connecting to databases, executing SQL statements, and processing results.
- JSPJavaServer Pages is a Java technology for creating dynamic web pages from templates containing Java-related elements and markup.
- code spikeA spike solution is an exploratory prototype used to investigate a potential solution and estimate its feasibility or effort.
- presenterA presenter is the Model-View-Presenter component that handles user gestures, coordinates with the model, and tells the view what to display.
- JspTestJspTest is an open-source Java library for compiling JavaServer Pages into servlet classes and invoking them in tests.
- concurrencyConcurrency is the overlapping progress of multiple computations.
- ActionFixtureActionFixture is a built-in Fit fixture class that maps action keywords in table rows to method calls on an actor object.
- browser simulation libraryA library that simulates browser interactions by exchanging HTTP traffic and interpreting returned web pages.
- RowMapperRowMapper is a Spring interface for converting a row of database results into an object.
- abstract uiAn abstract UI is a test-facing interface that represents user interactions without depending on concrete, technology-specific widgets.
- state-based testingState-based testing verifies behavior by comparing the state of the object under test and its collaborators with expected state.
- ColumnFixtureColumnFixture is a Fit fixture class that maps table columns to public fields and methods to perform calculations and check results.
- white-box testingWhite-box testing is a testing approach that uses knowledge of a system's internal structure or implementation.
- automated teardownA test-fixture pattern that encapsulates cleanup logic and associates cleanup responsibility with the creation of objects.
- object motherA test-support pattern in which an object or set of objects provides complete, valid domain objects and supports their customization and lifecycle management.
- parameterized creation methodA test-fixture pattern that encapsulates object creation, accepts important attributes as parameters, and supplies values for attributes irrelevant to the test.
- regression testA software test that checks whether previously working functionality remains intact after changes.
- HSQLDBHSQLDB is an open-source relational database management system written in Java that supports embedded and server modes.
- HtmlTestCaseHtmlTestCase is JspTest's abstract test base class, providing JSP rendering and HTML-oriented assertion methods.
- Apache VelocityApache Velocity is a Java-based template engine for generating text by merging templates with supplied data.
- supervising controllerSupervising Controller is a user-interface design pattern in which a controller or presenter handles complex presentation logic while the view handles simpler interactions, often using data binding.
- controllerA controller handles user input and coordinates application behavior, including changes to the model and selection of a view.
- custom assertionA test assertion pattern that encapsulates complex or specialized verification logic in a reusable method.
- delta assertionA test assertion pattern that checks the change between an initial state and a resulting state rather than checking an absolute state.
- guard assertionA test assertion pattern that checks assumptions about a fixture's starting state before the behavior under test is invoked.
- interaction assertionA test assertion pattern that verifies that code interacts with collaborator objects as expected rather than checking its results.
- resulting state assertionA test assertion pattern that checks whether an object's state after an operation matches an expected state.
- in-memory databaseAn in-memory database is a database that stores its data primarily in main memory rather than on persistent storage.
- file accessFile access is the reading or writing of data through files in a file system.
- test fixtureA test fixture is the set of objects and configured state initialized for use by a test.
- passive viewPassive View is a user-interface design pattern in which the presenter handles user gestures and view updates while the view displays data and delegates gestures.
- code coverageCode coverage measures how much of a software system's code is exercised by its tests.
- learning testA learning test is an automated test that verifies assumptions about code and teaches how that code behaves.
- regressionIn software, a change from previously working functionality to broken functionality.
- test harnessA test harness is a framework or system that supports the execution of software tests and reports their results.
- testabilityThe degree to which software can be readily instantiated, exercised, and verified through tests.
- evangelismEvangelization is the practice of advocating a proposed change to build support and encourage its adoption.
- storytellingA narrative medium for transferring knowledge through connected ideas and context.
- black-box testingBlack-box testing checks a system through its externally visible behavior without relying on knowledge of its internal implementation.
- RowFixtureRowFixture is a Fit fixture class that compares objects returned by a fixture query method with the rows of a fixture table.
- triangulationTriangulation is a test-driven development technique that adds tests with varied inputs to progressively constrain the required implementation.
- change agentA change agent is a person who promotes and supports the adoption of a change in a team or organization.
- polymorphismPolymorphism is the object-oriented capability for objects of different types to provide type-specific behavior through a shared interface.
- data access objectA data access object encapsulates access to a data source behind an interface used by application code.
- obvious implementationA test-driven development strategy of making a relatively large implementation step when the correct solution is clear.
- Model–view–controllerModel-view-controller is an architectural pattern that separates an application into model, view, and controller components.
- data definition languageA data definition language is a language for declaring and modifying database structures such as tables and columns.
- incremental DDL scriptAn incremental DDL script is a small database schema change that can be applied as a step in an ordered sequence of changes.
- data access codeData access code retrieves, stores, or otherwise interacts with data in storage systems or services.
- managing upwardThe practice of communicating with and addressing the concerns of people higher in an organization's hierarchy.
- component-based web frameworkA component-based web framework structures web applications as reusable components that encapsulate interface and behavior.
- intelligent brute-force testAn intelligent brute-force test deliberately maximizes the likelihood of exercising error-producing execution conditions.
- abstraction levelAn abstraction level is the degree of conceptual detail at which a method or other program element expresses its work.
- specification by exampleA requirements specification technique that communicates desired behavior through concrete examples rather than relying only on abstractions or prose.
- evaluation suiteA test suite is a collection of tests that can be run together to check software behavior.
- legacy codeLegacy code is existing software that must be maintained or changed, often with limited tests or a design that makes changes difficult.
- DoFixtureDoFixture is a FitLibrary fixture class that maps table rows to actions and supports alternating keyword and argument cells.
- Spring MVCSpring MVC is the web framework module of Spring Framework for building Java web applications using the Model-View-Controller pattern.
- failed testA failing test is a software test whose execution reports that the checked behavior does not meet its expectation.
- red phaseThe red phase is the stage of the test-driven development cycle in which a newly written test is run and fails.
- sharing sessionA group meeting organized to exchange knowledge, experience, or practices.
- thread synchronizationThread synchronization is the coordination of concurrent threads to control access to shared state or the ordering of their operations.
- definition of doneAn agreed criterion or set of conditions that determines when a task or piece of work is complete.
- coachingCoaching is a development practice in which a coach helps people examine their behavior and find solutions without supplying those solutions.
- facilitationFacilitation is the practice of guiding group interactions so participants can understand issues, make decisions, and work toward shared objectives.
- adoptionChange adoption is the process by which individuals or groups come to understand and take up a proposed change.
- three CsThe three Cs are card, conversation, and confirmation, the elements associated with a user story.
- Java SwingThe Swing API is the set of Java programming interfaces provided by the Swing GUI toolkit.
- test specificationA view of software tests as executable representations of requirements, such that passing them indicates conformity to the specified requirements.
- transactional fixtureA test fixture whose database changes are enclosed in a transaction that is rolled back during teardown to restore the starting state.
- domain-specific languageA domain-specific language is a language designed to express concepts and operations within a particular problem domain.
- machine-to-machine interfaceA machine-to-machine interface is an interface through which software systems communicate without a person directly interacting with it.
- faking itA test-driven development strategy that temporarily substitutes a fake implementation, often a fixed result, to make a failing test pass.
- blockingBlocking behavior occurs when an operation waits for a condition or event before proceeding.
- file access interfaceA file access interface is an application-defined abstraction that exposes file operations while hiding their underlying implementation.
- test cleanupTest cleanup is the removal or reset of files and other state created during test execution.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
