Tải bản đầy đủ
Appendix G. Patterns, Aliases, and Variations

Appendix G. Patterns, Aliases, and Variations

Tải bản đầy đủ

768

Patterns,
Aliases, and
Variations

Appendix G

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

Automated
Exercise
Teardown

505

Variation

Automated
Teardown

Chapter 22, Fixture
Teardown Patterns

Automated
Fixture Teardown

504

Variation

Automated
Teardown

Chapter 22, Fixture
Teardown Patterns

Automated
Teardown

503

Automated
Teardown

Chapter 22, Fixture
Teardown Patterns

Automated
Unit Test

285

Scripted Test

Chapter 18, Test
Strategy Patterns

Back Door
Manipulation

327

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Back Door
Setup

329

Variation

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Back Door
Teardown

330

Variation

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Back Door
Verification

329

Variation

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

BehaviorExposing
Subclass

580

Variation

Test-Specific
Subclass

Chapter 23, Test
Double Patterns

BehaviorModifying
Subclass

580

Variation

Test-Specific
Subclass

Chapter 23, Test
Double Patterns

Behavior
Verification

468

Behavior
Verification

Chapter 21, Result
Verification Patterns

Bespoke
Assertion

474

Alias

Custom Assertion

Chapter 21, Result
Verification Patterns

Built-in Test
Recording

281

Variation

Recorded Test

Chapter 18, Test
Strategy Patterns

Calculated
Values

718

Alias

Derived Value

Chapter 27, Value
Patterns

Capture/
Playback Test

278

Alias

Recorded Test

Chapter 18, Test
Strategy Patterns

Chained Tests

454

Chained Tests

Chapter 20, Fixture
Setup Patterns

Cleanup Method

602

Test Utility
Method

Chapter 24, Test
Organization
Patterns

Alias

Variation

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

Command-Line
Test Runner

379

Variation

Test Runner

Chapter 19, xUnit
Basics Patterns

Component
Broker

686

Alias

Dependency
Lookup

Chapter 26, Designfor-Testability
Patterns

Component
Registry

686

Alias

Dependency
Lookup

Chapter 26, Designfor-Testability
Patterns

Component Test

340

Variation

Layer Test

Chapter 18, Test
Strategy Patterns

Configurable
Mock Object

558

Alias

Configurable
Test Double

Chapter 23, Test
Double Patterns

Configurable
Test Double

558

Configurable
Test Double

Chapter 23, Test
Double Patterns

Configurable
Test Spy

558

Alias

Configurable
Test Double

Chapter 23, Test
Double Patterns

Configurable
Test Stub

558

Alias

Configurable
Test Double

Chapter 23, Test
Double Patterns

Configuration
Interface

560

Variation

Configurable
Test Double

Chapter 23, Test
Double Patterns

Configuration
Mode

560

Variation

Configurable
Test Double

Chapter 23, Test
Double Patterns

Constant Value

714

Alias

Literal Value

Chapter 27, Value
Patterns

Constructor
Injection

680

Variation

Dependency
Injection

Chapter 26, Designfor-Testability
Patterns

Constructor Test

351

Variation

Test Method

Chapter 19, xUnit
Basics Patterns

Creation Method

415

Creation Method

Chapter 20, Fixture
Setup Patterns

Custom
Assertion

474

Custom Assertion

Chapter 21, Result
Verification Patterns

Custom
Assertion Test

477

Variation

Custom Assertion

Chapter 21, Result
Verification Patterns

Custom Equality
Assertion

476

Variation

Custom Assertion

Chapter 21, Result
Verification Patterns
Continued...

769

Patterns,
Aliases, and
Variations

770

Patterns,
Aliases, and
Variations

Appendix G

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

DB Schema per
Test-Runner

651

Variation

Database Sandbox Chapter 25, Database
Patterns

Data Loader

330

Variation

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Data Retriever

331

Variation

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Data-Driven Test

288

Data-Driven Test

Chapter 18, Test
Strategy Patterns

Data-Driven Test
Framework (Fit)

290

Variation

Data-Driven Test

Chapter 18, Test
Strategy Patterns

Data-Driven Test
Frameworks

300

Variation

Test Automation
Framework

Chapter 18, Test
Strategy Patterns

Database
Extraction Script

331

Variation

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Database
Partitioning
Scheme

652

Variation

Database Sandbox Chapter 25, Database
Patterns

Database
Population Script

330

Variation

Back Door
Manipulation

Database
Sandbox

650

Decorated
Lazy Setup

449

Variation

Setup Decorator

Chapter 20, Fixture
Setup Patterns

Dedicated
Database Sandbox

651

Variation

Database Sandbox

Chapter 25, Database
Patterns

Delegated Setup

411

Delegated Setup

Chapter 20, Fixture
Setup Patterns

Delegated
Teardown

511

In-line Teardown

Chapter 22, Fixture
Teardown Patterns

Delta Assertion

485

Delta Assertion

Chapter 21, Result
Verification Patterns

Dependency
Initialization Test

352

Test Method

Chapter 19, xUnit
Basics Patterns

Dependency
Injection

678

Dependency
Injection

Chapter 26, Designfor-Testability
Patterns

Chapter 18, Test
Strategy Patterns

Database Sandbox Chapter 25, Database
Patterns

Variation

Variation

Patterns, Aliases, and Variations

Name

Page

Dependency
Lookup

686

Derived
Expectation

719

Derived Input

719

Derived Value

718

Diagnostic
Assertion

476

Direct Test
Method
Invocation

Relationship Base Name

Chapter

Dependency
Lookup

Chapter 26, Designfor-Testability
Patterns

Variation

Derived Value

Chapter 27, Value
Patterns

Variation

Derived Value

Chapter 27, Value
Patterns

Derived Value

Chapter 27, Value
Patterns

Variation

Custom Assertion

Chapter 21, Result
Verification Patterns

401

Variation

Test Enumeration

Chapter 19, xUnit
Basics Patterns

Distinct
Generated Value

724

Variation

Generated Value

Chapter 27, Value
Patterns

Domain
Assertion

476

Variation

Custom Assertion

Chapter 21, Result
Verification Patterns

Dummy

728

Alias

Dummy Object

Chapter 27, Value
Patterns

Dummy
Argument

729

Variation

Dummy Object

Chapter 27, Value
Patterns

Dummy
Attribute

729

Dummy Object

728

Dummy
Parameter

728

Dummy Value

Variation

771

Dummy Object

Chapter 27, Value
Patterns

Dummy Object

Chapter 27, Value
Patterns

Alias

Dummy Object

Chapter 27, Value
Patterns

728

Alias

Dummy Object

Chapter 27, Value
Patterns

Dynamically
Generated
Test Double

561

Variation

Configurable
Test Double

Chapter 23, Test
Double Patterns

Entity Chain
Snipping

531

Variation

Test Stub

Chapter 23, Test
Double Patterns

Equality
Assertion

365

Variation

Assertion Method

Chapter 19, xUnit
Basics Patterns
Continued...

Patterns,
Aliases, and
Variations

772

Patterns,
Aliases, and
Variations

Appendix G

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

ExpectationDescribing
Message

371

Variation

Assertion Message Chapter 19, xUnit
Basics Patterns

Expected
Behavior

470

Alias

Behavior
Verification

Chapter 21, Result
Verification Patterns

Expected
Behavior
Specification

470

Variation

Behavior
Verification

Chapter 21, Result
Verification Patterns

Expected
Exception
Assertion

366

Variation

Assertion Method

Chapter 19, xUnit
Basics Patterns

Expected
Exception Test

350

Variation

Test Method

Chapter 19, xUnit
Basics Patterns

Expected Object

464

Alias

State Verification

Chapter 21, Result
Verification Patterns

Expected State
Specification

464

Variation

State Verification

Chapter 21, Result
Verification Patterns

External Test
Recording

280

Variation

Recorded Test

Chapter 18, Test
Strategy Patterns

Fake Database

553

Variation

Fake Object

Chapter 23, Test
Double Patterns

Fake Object

551

Fake Object

Chapter 23, Test
Double Patterns

Fake Service
Layer

553

Variation

Fake Object

Chapter 23, Test
Double Patterns

Fake Web
Service

553

Variation

Fake Object

Chapter 23, Test
Double Patterns

File System
Test Runner

380

Variation

Test Runner

Chapter 19, xUnit
Basics Patterns

Finder Method

600

Variation

Test Utility
Method

Chapter 24, Test
Organization
Patterns

Fixture Setup
Testcase

456

Variation

Chained Tests

Chapter 20, Fixture
Setup Patterns

Four-Phase Test

358

Four-Phase Test

Chapter 19, xUnit
Basics Patterns

FrameworkInvoked Setup

424

Implicit Setup

Chapter 20, Fixture
Setup Patterns

Alias

Chapter

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

FrameworkInvoked
Teardown

516

Alias

Implicit Teardown

Chapter 22, Fixture
Teardown Patterns

Fresh Context

311

Alias

Fresh Fixture

Chapter 18, Test
Strategy Patterns

Fresh Fixture

311

Fresh Fixture

Chapter 18, Test
Strategy Patterns

Fuzzy Equality
Assertion

365

Assertion Method

Chapter 19, xUnit
Basics Patterns

GarbageCollected
Teardown

500

GarbageCollected
Teardown

Chapter 22, Fixture
Teardown Patterns

Generated Value

723

Generated Value

Chapter 27, Value
Patterns

Global Fixture

430

Variation

Prebuilt Fixture

Chapter 20, Fixture
Setup Patterns

Graphical
Test Runner

378

Variation

Test Runner

Chapter 19, xUnit
Basics Patterns

Guard Assertion

490

Guard Assertion

Chapter 21, Result
Verification Patterns

Hand-Built
Test Double

560

Configurable
Test Double

Chapter 23, Test
Double Patterns

Hand-Scripted
Test

285

Alias

Scripted Test

Chapter 18, Test
Strategy Patterns

Hand-Written
Test

285

Alias

Scripted Test

Chapter 18, Test
Strategy Patterns

Hard-Coded
Mock Object

568

Alias

Hard-Coded
Test Double

Chapter 23, Test
Double Patterns

Hard-Coded
Setup Decorator

449

Variation

Setup Decorator

Chapter 20, Fixture
Setup Patterns

Hard-Coded
Test Double

568

Hard-Coded
Test Double

Chapter 23, Test
Double Patterns

Hard-Coded
Test Stub

568

Alias

Hard-Coded
Test Double

Chapter 23, Test
Double Patterns

Hard-Coded
Value

714

Alias

Literal Value

Chapter 27, Value
Patterns

Variation

Variation

Continued...

773

Patterns,
Aliases, and
Variations

774

Patterns,
Aliases, and
Variations

Appendix G

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

Hooked Setup

424

Alias

Implicit Setup

Chapter 20, Fixture
Setup Patterns

Hooked
Teardown

516

Alias

Implicit Teardown

Chapter 22, Fixture
Teardown Patterns

Humble
Container
Adapter

698

Variation

Humble Object

Chapter 26, Designfor-Testability
Patterns

Humble Dialog

696

Variation

Humble Object

Chapter 26, Designfor-Testability
Patterns

Humble
Executable

697

Variation

Humble Object

Chapter 26, Designfor-Testability
Patterns

Humble Object

695

Humble Object

Chapter 26, Designfor-Testability
Patterns

Humble
Transaction
Controller

697

Variation

Humble Object

Chapter 26, Designfor-Testability
Patterns

Immutable
Shared Fixture

323

Variation

Shared Fixture

Chapter 18, Test
Strategy Patterns

Implicit Setup

424

Implicit Setup

Chapter 20, Fixture
Setup Patterns

Implicit
Teardown

516

Implicit Teardown

Chapter 22, Fixture
Teardown Patterns

Imposter

522

Alias

Test Double

Chapter 23, Test
Double Patterns

In-Database
Stored Procedure
Test

655

Variation

Stored Procedure
Test

Chapter 25, Database
Patterns

In-Memory
Database

553

Variation

Fake Object

Chapter 23, Test
Double Patterns

Incremental
Tabular Test

609

Variation

Parameterized Test Chapter 24, Result
Verification Patterns

Incremental Tests

322

Variation

Shared Fixture

Chapter 18, Test
Strategy Patterns

Indirect Output
Registry

541

Variation

Test Spy

Chapter 23, Test
Double Patterns

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

In-line Setup

408

In-line Setup

Chapter 20, Fixture
Setup Patterns

In-line Teardown

509

In-line Teardown

Chapter 22, Fixture
Teardown Patterns

Inner Test
Double

570

Variation

Hard-Coded
Test Double

Chapter 23, Test
Double Patterns

Interaction
Testing

468

Alias

Behavior
Verification

Chapter 21, Result
Verification Patterns

Layer Test

337

Layer Test

Chapter 18, Test
Strategy Patterns

Layer-Crossing
Test

327

Alias

Back Door
Manipulation

Chapter 18, Test
Strategy Patterns

Layered Test

337

Alias

Layer Test

Chapter 18, Test
Strategy Patterns

Lazy Setup

435

Lazy Setup

Chapter 20, Fixture
Setup Patterns

Lazy Teardown

663

Variation

Table Truncation
Teardown

Chapter 25, Database
Patterns

Leftover Fixture

317

Alias

Shared Fixture

Chapter 18, Test
Strategy Patterns

Literal Value

714

Literal Value

Chapter 27, Value
Patterns

Loop-Driven
Test

610

Parameterized
Test

Chapter 24, Result
Verification Patterns

Minimal Fixture

302

Minimal Fixture

Chapter 18, Test
Strategy Patterns

Minimal
Context

302

Minimal Fixture

Chapter 18, Test
Strategy Patterns

Mock Object

544

Mock Object

Chapter 23, Test
Double Patterns

Naive In-line
Teardown

511

Variation

In-line Teardown

Chapter 22, Fixture
Teardown Patterns

Naive xUnit
Test Interpreter

292

Variation

Data-Driven Test

Chapter 18, Test
Strategy Patterns

Named State
Reaching Method

417

Variation

Creation Method

Chapter 20, Fixture
Setup Patterns

Variation

Alias

775

Chapter

Continued...

Patterns,
Aliases, and
Variations

776

Patterns,
Aliases, and
Variations

Appendix G

Patterns, Aliases, and Variations

Name

Page

Named Test Suite

592

Relationship Base Name

Chapter

Named Test Suite

Chapter 24, Test
Organization
Patterns

Object Attribute 476
Equality Assertion

Variation

Custom Assertion

Chapter 21, Result
Verification Patterns

Object Factory

686

Alias

Dependency
Lookup

Chapter 26, Designfor-Testability
Patterns

Object Mother

644

Variation

Test Helper

Chapter 24, Test
Organization
Patterns

One Bad
Attribute

719

Variation

Derived Value

Chapter 27, Value
Patterns

Parameter
Injection

680

Variation

Dependency
Injection

Chapter 26, Designfor-Testability
Patterns

Parameterized
Anonymous
Creation Method

417

Variation

Creation Method

Chapter 20, Fixture
Setup Patterns

Parameterized
Creation
Method

417

Variation

Creation Method

Chapter 20, Fixture
Setup Patterns

Parameterized
Setup Decorator

449

Variation

Setup Decorator

Chapter 20, Fixture
Setup Patterns

Parameterized
Test

607

Parameterized Test

Chapter 21, Result
Verification Patterns

Per-Run Fixture

323

Variation

Shared Fixture

Chapter 18, Test
Strategy Patterns

Persistence Layer
Test

339

Variation

Layer Test

Chapter 18, Test
Strategy Patterns

Persistent Fresh
Fixture

314

Variation

Fresh Fixture

Chapter 18, Test
Strategy Patterns

Placeholder

728

Alias

Dummy Object

Chapter 27, Value
Patterns

Poor Man’s
Humble Object

699

Variation

Humble Object

Chapter 26, Designfor-Testability
Patterns

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

Prebuilt Context

429

Alias

Prebuilt Fixture

Chapter 20, Fixture
Setup Patterns

Prebuilt Fixture

429

Prebuilt Fixture

Chapter 20, Fixture
Setup Patterns

Presentation
Layer Test

338

Variation

Layer Test

Chapter 18, Test
Strategy Patterns

Private Fixture

311

Alias

Fresh Fixture

Chapter 18, Test
Strategy Patterns

Procedural
Behavior
Verification

470

Variation

Behavior
Verification

Chapter 21, Result
Verification Patterns

Procedural State
Verification

463

Variation

State Verification

Chapter 21, Result
Verification Patterns

Procedural
Test Stub

526

Variation

Test Stub

Chapter 23, Test
Double Patterns

Programmatic
Test

285

Alias

Scripted Test

Chapter 18, Test
Strategy Patterns

Pseudo-Object

571

Variation

Hard-Coded
Test Double

Chapter 23, Test
Double Patterns

Pushdown
Decorator

450

Variation

Setup Decorator

Chapter 20, Fixture
Setup Patterns

Random
Generated Value

724

Variation

Generated Value

Chapter 27, Value
Patterns

Record and
Playback Test

278

Alias

Recorded Test

Chapter 18, Test
Strategy Patterns

Recorded Test

278

Recorded Test

Chapter 18, Test
Strategy Patterns

Refactored
Recorded Test

280

Variation

Recorded Test

Chapter 18, Test
Strategy Patterns

Related
Generated Value

725

Variation

Generated Value

Chapter 27, Value
Patterns

Remoted Stored
Procedure Test

656

Variation

Stored Procedure
Test

Chapter 25, Database
Patterns

Responder

530

Variation

Test Stub

Chapter 23, Test
Double Patterns

Retrieval
Interface

540

Variation

Test Spy

Chapter 23, Test
Double Patterns
Continued...

777

Patterns,
Aliases, and
Variations

778

Patterns,
Aliases, and
Variations

Appendix G

Patterns, Aliases, and Variations

Name

Page

Relationship Base Name

Chapter

Reuse Test for
Fixture Setup

418

Variation

Creation Method

Chapter 20, Fixture
Setup Patterns

Reused Fixture

317

Alias

Shared Fixture

Chapter 18, Test
Strategy Patterns

Robot User Test

278

Alias

Recorded Test

Chapter 18, Test
Strategy Patterns

Robot User
Test Framework

299

Variation

Test Automation
Framework

Chapter 18, Test
Strategy Patterns

Row Test

609

Alias

Parameterized Test Chapter 24, Test
Organization Patterns

SUT API
Encapsulation

601

Alias

Test Utility
Method

Chapter 24, Test
Organization
Patterns

SUT
Encapsulation
Method

601

Variation

Test Utility
Method

Chapter 24, Test
Organization
Patterns

Saboteur

530

Variation

Test Stub

Chapter 23, Test
Double Patterns

Scripted Test

285

Scripted Test

Chapter 18, Test
Strategy Patterns

Self Shunt

540

Variation

Hard-Coded
Test Double

Chapter 23, Test
Double Patterns

Self-Describing
Value

715

Variation

Literal Value

Chapter 27, Value
Patterns

Service Layer
Test

339

Variation

Layer Test

Chapter 18, Test
Strategy Patterns

Service Locator

686

Alias

Dependency
Lookup

Chapter 26, Designfor-Testability
Patterns

Setter Injection

681

Variation

Dependency
Injection

Chapter 26, Designfor-Testability
Patterns

Setup Decorator

447

Setup Decorator

Chapter 20, Fixture
Setup Patterns

Shared Context

317

Shared Fixture

Chapter 18, Test
Strategy Patterns

Shared Fixture

317

Shared Fixture

Chapter 18, Test
Strategy Patterns

Alias