Don't Mock 3rd Party Code

Subscribers:
230,000
Published on ● Video Link: https://www.youtube.com/watch?v=v6hP2MXoVrI



Duration: 19:56
30,998 views
1,181


Mocking can be a valuable tool in software testing, but mocking 3rd party libraries is nearly always a bad place to start. Dave Farley, author of books on Continuous Delivery and Software Engineering, demonstrates mocking 3rd party code with examples of code, tests and use of mocking, and how all are improved with good design choices.

If the code we are testing interacts with something else, then we probably want to know if this interaction happened, but it can be risky to use tools to generate mocks for third party code. People complain that it is complicated and results in tests being tightly coupled to the solution. This is not necessarily the fault of mocking though, it may be because the code is rubbish!

-----------------------------------------------------------------------------------

⭐ PATREON:

Join the Continuous Delivery community and access extra perks & content!

JOIN HERE ➡️ https://bit.ly/ContinuousDeliveryPatreon

-------------------------------------------------------------------------------------

📧 Join the CD Mail List here ➡️ https://www.subscribepage.com/cd-mail-list

FREE TDD TUTORIAL: Learn what it takes to get started and learn the skills of TDD, with a hands-on demonstration by Dave Farley ➡️ https://courses.cd.training/courses/tdd-tutorial

Want to learn more advanced TDD and BDD techniques?
🎓 https://courses.cd.training/courses/tdd-bdd-design-through-testing
With this course for software technicians, you'll learn how TDD and BDD combine to strengthen the design of your code, improve your programming skills and significantly reduce bugs in production.
-------------------------------------------------------------------------------------

🔗 LINKS

xUnit Patterns: http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html

“Tell Don’t Ask”, Martin Fowler: https://martinfowler.com/bliki/TellDontAsk.html

-------------------------------------------------------------------------------------

👕 T-SHIRTS:

A fan of the T-shirts I wear in my videos? Grab your own, at reduced prices EXCLUSIVE TO CONTINUOUS DELIVERY FOLLOWERS! Get money off the already reasonably priced t-shirts!

🔗 Check out their collection HERE: https://bit.ly/3vTkWy3
🚨 DON'T FORGET TO USE THIS DISCOUNT CODE: ContinuousDelivery

-------------------------------------------------------------------------------------
📚 BOOKS:

📖 Dave’s NEW BOOK "Modern Software Engineering" is available as paperback, or kindle here ➡️ https://amzn.to/3DwdwT3
and NOW as an AUDIOBOOK available on iTunes, Amazon and Audible.

📖 The original, award-winning "Continuous Delivery" book by Dave Farley and Jez Humble ➡️ https://amzn.to/2WxRYmx

📖 "Continuous Delivery Pipelines" by Dave Farley
Paperback ➡️ https://amzn.to/3gIULlA
ebook version ➡️ https://leanpub.com/cd-pipelines

NOTE: If you click on one of the Amazon Affiliate links and buy the book, Continuous Delivery Ltd. will get a small fee for the recommendation with NO increase in cost to you.

-------------------------------------------------------------------------------------

CHANNEL SPONSORS:

Equal Experts is a product software development consultancy with a network of over 1,000 experienced technology consultants globally. They increase the pace of innovation by using modern software engineering practices that embrace Continuous Delivery, Security, and Operability from the outset ➡️ https://bit.ly/3ASy8n0

Roost, An Ephemeral DevOps Platform, automates your DevOps pipeline. It creates ephemeral DevOps environments on-demand or based on pull requests. Roost reduces DevOps complexities and shortens release cycles with fewer engineers. ➡️ https://bit.ly/CD2Roost

Tricentis is an AI-powered platform helping you to deliver digital innovation faster and with less risk by providing a fundamentally better approach to test automation. Discover the power of continuous testing with Tricentis. ➡️ https://bit.ly/TricentisCD

TransFICC provides low-latency connectivity, automated trading workflows and e-trading systems for Fixed Income and Derivatives. TransFICC resolves the issue of market fragmentation by providing banks and asset managers with a unified low-latency, robust and scalable API, which provides connectivity to multiple trading venues while supporting numerous complex workflows across asset classes such as Rates and Credit Bonds, Repos, Mortgage-Backed Securities and Interest Rate Swaps ➡️ https://transficc.com




Other Videos By Modern Software Engineering


2023-05-10Is SAFe REALLY Safe?
2023-05-03Add APPROVAL TESTING To Your Bag Of Tricks
2023-04-30The Poor Standard Of Teaching In Computer Science | Aino Corry In The Engineering Room Ep. 17
2023-04-26The ESSENTIAL Qualities Of GREAT Development Teams
2023-04-23Gregor Hohpe On Reducing The Cost Of Being Wrong
2023-04-19Why Does Everyone HATE JavaScript? (Yet Still Use It?)
2023-04-12Software Engineer Asks To STOP AI RESEARCH
2023-04-09Kelsey Hightower & Dave Debate Stateful Serverless, Asynchrony & MORE
2023-04-05Mob Programming Surprised Me
2023-04-02Did Kent Beck REALLY Invent TDD? | Kent Talks About TDD, TCR & Reveals One Of His BEST Ideas
2023-03-29Don't Mock 3rd Party Code
2023-03-26Kent Beck On The FIRST Testing Frameworks, TDD, Waterfall & MORE | The Engineering Room Ep. 16
2023-03-22From Legacy Code To STATE OF THE ART DEVELOPMENT
2023-03-19GITFLOW ISN'T COMPATIBLE WITH CONTINUOUS DELIVERY | Bryan Finster On CD and Gitflow's Definition
2023-03-15Functional Programming IS NO BETTER than Object Oriented Programming
2023-03-12The Ultimate Quality Of GOOD Software | Matthew Skelton & Dave Farley Talk About Embracing Change
2023-03-08Your Programming "Hobby" WON'T Cut It
2023-03-05Why Architects MUST Code | Gregor Hohpe On Types Of Architecture & Their Importance
2023-03-01Is Designing Different To Coding?
2023-02-26Gregor Hohpe On How Software Architects Transform Large Enterprises | The Engineering Room Ep. 15
2023-02-22You ONLY Get Code LIKE THIS With TDD



Tags:
software mock
mocking software
mocking 3rd party code
3rd party code
third party code
don't mock code
stop mocking code
software testing
test 3rd party code
software mock test
unit test mock
unit test
mocking software testing
programming
computer science
software engineering
software development
Dave Farley
continuous delivery