Tag

Test Doubles

1 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
May 30, 2024 · Backend Development

Understanding Mock, Dummy, Spy, Stub, and Fake Test Doubles in PHP Unit Testing

This article explains the differences and appropriate use cases of Mock, Dummy, Spy, Stub, and Fake test doubles in PHP unit testing, providing clear code examples to help developers write effective and maintainable tests.

StubTest DoublesUnit Testing
0 likes · 6 min read
Understanding Mock, Dummy, Spy, Stub, and Fake Test Doubles in PHP Unit Testing
FunTester
FunTester
Mar 15, 2023 · Fundamentals

Continuous Testing and Contract Testing: Techniques and Practices

The article explains how continuous testing provides rapid feedback and balanced test coverage, introduces contract testing and test doubles to decouple service dependencies, describes the consumer‑driven contract testing approach with Pact, and outlines scenarios where Pact is appropriate or unsuitable.

Continuous TestingTest Doublescontract testing
0 likes · 8 min read
Continuous Testing and Contract Testing: Techniques and Practices
Continuous Delivery 2.0
Continuous Delivery 2.0
Apr 21, 2021 · Fundamentals

Don’t Mock Types You Don’t Own: Risks and Better Alternatives

The article explains why mocking external components you don’t control can introduce maintenance problems, such as hidden bugs and upgrade difficulties, and suggests using real implementations, library‑provided fakes, or wrapper classes instead, while offering code examples and practical guidance.

Test DoublesUnit Testingjava
0 likes · 5 min read
Don’t Mock Types You Don’t Own: Risks and Better Alternatives
Continuous Delivery 2.0
Continuous Delivery 2.0
Dec 22, 2020 · Fundamentals

Classification and Best Practices for Test Doubles (Dumb, Fake, Stub, Mock)

The article explains the different types of test doubles—Dumb, Fake, Stub, and Mock—provides guidelines on when to prefer real implementations, discusses the drawbacks of overusing Stubs and Mocks, and offers practical advice for writing and maintaining Fakes in software testing.

Test DoublesUnit Testingfakes
0 likes · 10 min read
Classification and Best Practices for Test Doubles (Dumb, Fake, Stub, Mock)