SlideShare a Scribd company logo
Don’t let your
unit tests
slow you down
Daniel Irvine
@d_ir
React Advanced London 2019
@d_ir
tl;dl
@d_ir
tl;dl Good tests remove fear of change.
Confidence of change boosts your
speed.
@d_ir
tdd This is not a talk about test-driven
development!
Many TDD talks shame people into believing
everyone else is doing it wrong.
The techniques I’ll cover today will help you
even if you don’t use TDD.
@d_ir
example “TDD isn’t about unit testing!”
“You are doing it wrong if every class
has unit tests!”
What’s the actual message here?
Unit tests should still be your bread and butter.
@d_ir
10x myth Writing great tests will accelerate
your development.
Unlike working with rockstar programmers,
testing is a social activity that benefits the whole
team. Each test encodes a requirement that
everyone on the team can understand.
describe('name field', () => {

it('saves new value when form is submitted', () => {

// ...

});

});
Developer tests QA tests
@d_ir
Developer tests
• Encode requirements
• Catch regression
QA tests
@d_ir
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
@d_ir
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
@d_ir
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
@d_ir
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
• Catch performance degradation
• Check usability
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
@d_ir
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
• Catch performance degradation
• Check usability
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
Removing fear
of change
@d_ir
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
• Catch performance degradation
• Check usability
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
Removing fear
of change
@d_ir
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
• Catch performance degradation
• Check usability
Developer tests
• Encode requirements
• Catch regression
QA tests
• Encode requirements
• Catch regression
Removing fear
of change
Reducing dev
time
@d_ir
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
• Catch performance degradation
• Check usability
@d_ir
idea 1 Always follow Arrange-Act-Assert.
it('renders the customer first name', () => {

const customer = { firstName: 'Ashley' };



render(<Appointment customer={customer} />);

expect(appointmentTable().textContent).toMatch('Ashley');

});
@d_ir
idea 2 Test the lifecycle of your
components.
it('renders appointment when selected', () => {
render(

<AppointmentsDayView appointments={appointments} />

);

click(element(button));

expect(container.textContent).toMatch('Ashley');
});
@d_ir
idea 2 Test the lifecycle of your
components.
it('renders validation error when submit fails', async
() => {

render(<CustomerForm />);

await submit(form('customer'));

expect(element('.error')).not.toBeNull();
});
@d_ir
idea 2 Test the lifecycle of your
components.
it('fetches again when prop changes', async () => {
const tomorrow = new Date(today);
tomorrow.setHours(24);
await renderAndWait(<AppointmentsDay day={today} />);
await renderAndWait(<AppointmentsDay day={tomorrow} />);
expect(window.fetch).toHaveBeenLastCalledWith(
`/appointments/${tomorrow}`,
expect.anything()
);
});
@d_ir
idea 3 Be aware of each test’s surface area
R
A B
C D
D
D
@d_ir
idea 3 Be aware of each test’s surface area
R
A B
C D
D
D
Tests on

A without mocks
will exercise
functionality
in A, C and D
Test failures do not
pinpoint error
@d_ir
idea 3 Be aware of each test’s surface area
R
A B
C D
D
D
Tests on

A without mocks
will exercise
functionality
in A, C and D
Tests on B exercise
just B
Test failures do not
pinpoint error
Test failures rapidly
pinpoint error
@d_ir
idea 3 Be aware of each test’s surface area
R
A B
C D
D
D
Tests on

A without mocks
will exercise
functionality
in A, C and D
Tests on B exercise
just B
Test failures do not
pinpoint error
Test failures rapidly
pinpoint error
Tests on D exercise
just D
The usage of D in A will
still need to be tested in A
@d_ir
idea 4 Make a mess, then refactor.
(Okay, so this is kind of about TDD.)
‘Making a mess’ is a technical term that means
something like this: when you’ve got a new
requirement to implement, solve it by writing
the least amount of code in one long procedure.
Don’t think!
@d_ir
idea 5 Get out of React components at
every opportunity.
Testing components is complicated. Testing
plain objects is not. So always prefer that.
Components should be for rendering and
responding to DOM events.
Any business logic, even something as simple as
a humble if, should be elsewhere.
@d_ir
idea 6 Write your own test library.
@d_ir
idea 6 Write your own test library.
1. Replacing Enzyme or react-testing-library
with your own version is an excellent way to
further your learning.
@d_ir
idea 6 Write your own test library.
1. Replacing Enzyme or react-testing-library
with your own version is an excellent way to
further your learning.
2. These libraries lock you in to their way of
working. Rolling your own gives you a lot
more freedom to do things in other ways.
@d_ir
idea 6 Write your own test library.
1. Replacing Enzyme or react-testing-library
with your own version is an excellent way to
further your learning.
2. These libraries lock you in to their way of
working. Rolling your own gives you a lot
more freedom to do things in other ways.
3. The DOM API is straightforward. No need to
learn “yet another library”.
@d_ir
idea 6 Write your own test library.
const renderAndWait = async component =>
await act(async () =>
ReactDOM.render(component, container));
const element = selector =>
container.querySelector(selector);
const click = element =>
ReactTestUtils.Simulate.click(element);
const submit = async element =>
await act(async () =>
ReactTestUtils.Simulate.submit(element)
);
@d_ir
idea 6 Write your own test library.
click(elementMatching(id('addCustomer')));
It works for shallow rendering too…
const buttons = childrenOf(
elementMatching(className('button-bar'))
);
expect(elementMatching(type(CustomerForm))
.toBeDefined();
@d_ir
Question: How are you going to learn testing?
Most effective
Least effective
Pair and mob with experienced developers
Read TDD books and apply what you learn
Read well-tested codebases
Attend coding dojos
Work on TDD katas
@d_ir
@d_ir
@d_ir
@d_ir
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
Snapshots are a useful way to quickly check if
your component’s visual state has changed
unexpectedly. 



You can visually inspect the HTML output of your
component.
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
• Encode requirements
• Catch regression
• Assist with design
• Guide refactoring
• Explain your code to others
• Pinpoint errors
• Minimize debugging
• Minimize manual testing
🤔
🤔
@d_ir
Question: How well do snapshots fit our
definition of developer tests?
Hinderance Help
Bad tests Great tests
No tests
@d_ir
Finish Tests can overcome your fear of
change and help you work faster.
What about the fear of getting started?
Yes, you will write bad tests when you start. You
just have to keep going. Keep practicing. You’ll
improve.
@d_ir
Finish Tests can overcome your fear of
change and help you work faster.
What about the fear of getting started?
Yes, you will write bad tests when you start. You
just have to keep going. Keep practicing. You’ll
improve.
Thank you
Daniel Irvine

More Related Content

PDF
TDD vs. ATDD - What, Why, Which, When & Where
PDF
Atdd half day_new_1_up
PPTX
(A)TDD The what, why and how
PDF
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
PDF
Lessons learned with Bdd: a tutorial
KEY
Getting Comfortable with BDD
PPTX
Journey of atdd
KEY
ATDD in Practice
TDD vs. ATDD - What, Why, Which, When & Where
Atdd half day_new_1_up
(A)TDD The what, why and how
Overview on TDD (Test Driven Development) & ATDD (Acceptance Test Driven Deve...
Lessons learned with Bdd: a tutorial
Getting Comfortable with BDD
Journey of atdd
ATDD in Practice

What's hot (20)

PPTX
Test-Driven Development (TDD)
PPTX
BDD presentation
PDF
A journey to_be_a_software_craftsman
PDF
Bdd Introduction
PDF
TDD and Simple Design Workshop - Session 1 - March 2019
PDF
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
KEY
Introduction to Acceptance Test Driven Development
PDF
Being a professional software tester
PDF
Real Developers Don't Need Unit Tests
PPTX
Code quality
PDF
Scrum is not enough - being a successful agile engineer
PDF
Refactoring Legacy Code
PPTX
Tdd & clean code
PPTX
Tdd is not about testing (C++ version)
PPTX
Dev labs alliance top 20 basic java interview questions for sdet
PDF
Clean Code V2
PDF
The View - Lotusscript coding best practices
PDF
Database Refactoring
PPTX
Tdd is not about testing (OOP)
PDF
[QaOps] Continuouss Integration | Pipeline strategy
Test-Driven Development (TDD)
BDD presentation
A journey to_be_a_software_craftsman
Bdd Introduction
TDD and Simple Design Workshop - Session 1 - March 2019
Pragmatic Not Dogmatic TDD Agile2012 by Joseph Yoder and Rebecca Wirfs-Brock
Introduction to Acceptance Test Driven Development
Being a professional software tester
Real Developers Don't Need Unit Tests
Code quality
Scrum is not enough - being a successful agile engineer
Refactoring Legacy Code
Tdd & clean code
Tdd is not about testing (C++ version)
Dev labs alliance top 20 basic java interview questions for sdet
Clean Code V2
The View - Lotusscript coding best practices
Database Refactoring
Tdd is not about testing (OOP)
[QaOps] Continuouss Integration | Pipeline strategy
Ad

Similar to Don't let your tests slow you down (20)

ODP
Writing useful automated tests for the single page applications you build
PDF
TDD: Develop, Refactor and Release With Confidence
PDF
Vladyslav Romanchenko "How to keep high code quality without e2e tests"
PDF
Intro to JavaScript Testing
PDF
Five steps towards your testing dream
PDF
Test driven development and react js application go hand in hand
PDF
An existential guide to testing React UIs
PDF
Functional Testing for React Native Apps
PDF
Best Practices for React Developer Test Technical Assessment for Hiring.pdf
PPTX
Productive development with react js
PDF
ES3-2020-06 Test Driven Development (TDD)
PDF
Continuous Testing With React Storybook & WebdriverIO
PDF
Intro To JavaScript Unit Testing - Ran Mizrahi
PDF
An Introduction to the World of Testing for Front-End Developers
PDF
FITC Web Unleashed 2017 - Introduction to the World of Testing for Front-End ...
PDF
How to push a react js application in production and sleep better
PPTX
Automated UI Testing Done Right (QMSDNUG)
PPTX
Generative Testing in Clojure
PDF
Hardening
PDF
Software Testing
Writing useful automated tests for the single page applications you build
TDD: Develop, Refactor and Release With Confidence
Vladyslav Romanchenko "How to keep high code quality without e2e tests"
Intro to JavaScript Testing
Five steps towards your testing dream
Test driven development and react js application go hand in hand
An existential guide to testing React UIs
Functional Testing for React Native Apps
Best Practices for React Developer Test Technical Assessment for Hiring.pdf
Productive development with react js
ES3-2020-06 Test Driven Development (TDD)
Continuous Testing With React Storybook & WebdriverIO
Intro To JavaScript Unit Testing - Ran Mizrahi
An Introduction to the World of Testing for Front-End Developers
FITC Web Unleashed 2017 - Introduction to the World of Testing for Front-End ...
How to push a react js application in production and sleep better
Automated UI Testing Done Right (QMSDNUG)
Generative Testing in Clojure
Hardening
Software Testing
Ad

Recently uploaded (20)

PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
AI in Product Development-omnex systems
PDF
Nekopoi APK 2025 free lastest update
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
System and Network Administration Chapter 2
PDF
System and Network Administraation Chapter 3
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
L1 - Introduction to python Backend.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
Which alternative to Crystal Reports is best for small or large businesses.pdf
ai tools demonstartion for schools and inter college
Softaken Excel to vCard Converter Software.pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
AI in Product Development-omnex systems
Nekopoi APK 2025 free lastest update
Understanding Forklifts - TECH EHS Solution
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
System and Network Administration Chapter 2
System and Network Administraation Chapter 3
CHAPTER 2 - PM Management and IT Context
L1 - Introduction to python Backend.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
ISO 45001 Occupational Health and Safety Management System
Upgrade and Innovation Strategies for SAP ERP Customers

Don't let your tests slow you down

  • 1. Don’t let your unit tests slow you down Daniel Irvine @d_ir React Advanced London 2019
  • 3. @d_ir tl;dl Good tests remove fear of change. Confidence of change boosts your speed.
  • 4. @d_ir tdd This is not a talk about test-driven development! Many TDD talks shame people into believing everyone else is doing it wrong. The techniques I’ll cover today will help you even if you don’t use TDD.
  • 5. @d_ir example “TDD isn’t about unit testing!” “You are doing it wrong if every class has unit tests!” What’s the actual message here? Unit tests should still be your bread and butter.
  • 6. @d_ir 10x myth Writing great tests will accelerate your development. Unlike working with rockstar programmers, testing is a social activity that benefits the whole team. Each test encodes a requirement that everyone on the team can understand. describe('name field', () => {
 it('saves new value when form is submitted', () => {
 // ...
 });
 });
  • 7. Developer tests QA tests @d_ir
  • 8. Developer tests • Encode requirements • Catch regression QA tests @d_ir
  • 9. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression @d_ir
  • 10. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression @d_ir • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing
  • 11. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression @d_ir • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing • Catch performance degradation • Check usability
  • 12. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression @d_ir • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing • Catch performance degradation • Check usability
  • 13. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression Removing fear of change @d_ir • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing • Catch performance degradation • Check usability
  • 14. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression Removing fear of change @d_ir • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing • Catch performance degradation • Check usability
  • 15. Developer tests • Encode requirements • Catch regression QA tests • Encode requirements • Catch regression Removing fear of change Reducing dev time @d_ir • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing • Catch performance degradation • Check usability
  • 16. @d_ir idea 1 Always follow Arrange-Act-Assert. it('renders the customer first name', () => {
 const customer = { firstName: 'Ashley' };
 
 render(<Appointment customer={customer} />);
 expect(appointmentTable().textContent).toMatch('Ashley');
 });
  • 17. @d_ir idea 2 Test the lifecycle of your components. it('renders appointment when selected', () => { render(
 <AppointmentsDayView appointments={appointments} />
 );
 click(element(button));
 expect(container.textContent).toMatch('Ashley'); });
  • 18. @d_ir idea 2 Test the lifecycle of your components. it('renders validation error when submit fails', async () => {
 render(<CustomerForm />);
 await submit(form('customer'));
 expect(element('.error')).not.toBeNull(); });
  • 19. @d_ir idea 2 Test the lifecycle of your components. it('fetches again when prop changes', async () => { const tomorrow = new Date(today); tomorrow.setHours(24); await renderAndWait(<AppointmentsDay day={today} />); await renderAndWait(<AppointmentsDay day={tomorrow} />); expect(window.fetch).toHaveBeenLastCalledWith( `/appointments/${tomorrow}`, expect.anything() ); });
  • 20. @d_ir idea 3 Be aware of each test’s surface area R A B C D D D
  • 21. @d_ir idea 3 Be aware of each test’s surface area R A B C D D D Tests on
 A without mocks will exercise functionality in A, C and D Test failures do not pinpoint error
  • 22. @d_ir idea 3 Be aware of each test’s surface area R A B C D D D Tests on
 A without mocks will exercise functionality in A, C and D Tests on B exercise just B Test failures do not pinpoint error Test failures rapidly pinpoint error
  • 23. @d_ir idea 3 Be aware of each test’s surface area R A B C D D D Tests on
 A without mocks will exercise functionality in A, C and D Tests on B exercise just B Test failures do not pinpoint error Test failures rapidly pinpoint error Tests on D exercise just D The usage of D in A will still need to be tested in A
  • 24. @d_ir idea 4 Make a mess, then refactor. (Okay, so this is kind of about TDD.) ‘Making a mess’ is a technical term that means something like this: when you’ve got a new requirement to implement, solve it by writing the least amount of code in one long procedure. Don’t think!
  • 25. @d_ir idea 5 Get out of React components at every opportunity. Testing components is complicated. Testing plain objects is not. So always prefer that. Components should be for rendering and responding to DOM events. Any business logic, even something as simple as a humble if, should be elsewhere.
  • 26. @d_ir idea 6 Write your own test library.
  • 27. @d_ir idea 6 Write your own test library. 1. Replacing Enzyme or react-testing-library with your own version is an excellent way to further your learning.
  • 28. @d_ir idea 6 Write your own test library. 1. Replacing Enzyme or react-testing-library with your own version is an excellent way to further your learning. 2. These libraries lock you in to their way of working. Rolling your own gives you a lot more freedom to do things in other ways.
  • 29. @d_ir idea 6 Write your own test library. 1. Replacing Enzyme or react-testing-library with your own version is an excellent way to further your learning. 2. These libraries lock you in to their way of working. Rolling your own gives you a lot more freedom to do things in other ways. 3. The DOM API is straightforward. No need to learn “yet another library”.
  • 30. @d_ir idea 6 Write your own test library. const renderAndWait = async component => await act(async () => ReactDOM.render(component, container)); const element = selector => container.querySelector(selector); const click = element => ReactTestUtils.Simulate.click(element); const submit = async element => await act(async () => ReactTestUtils.Simulate.submit(element) );
  • 31. @d_ir idea 6 Write your own test library. click(elementMatching(id('addCustomer'))); It works for shallow rendering too… const buttons = childrenOf( elementMatching(className('button-bar')) ); expect(elementMatching(type(CustomerForm)) .toBeDefined();
  • 32. @d_ir Question: How are you going to learn testing? Most effective Least effective Pair and mob with experienced developers Read TDD books and apply what you learn Read well-tested codebases Attend coding dojos Work on TDD katas
  • 33. @d_ir
  • 34. @d_ir
  • 35. @d_ir
  • 36. @d_ir
  • 37. @d_ir Question: How well do snapshots fit our definition of developer tests? Snapshots are a useful way to quickly check if your component’s visual state has changed unexpectedly. 
 
 You can visually inspect the HTML output of your component.
  • 38. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing
  • 39. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing
  • 40. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔
  • 41. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔
  • 42. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔 🤔
  • 43. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔 🤔
  • 44. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔 🤔
  • 45. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔 🤔
  • 46. @d_ir Question: How well do snapshots fit our definition of developer tests? • Encode requirements • Catch regression • Assist with design • Guide refactoring • Explain your code to others • Pinpoint errors • Minimize debugging • Minimize manual testing 🤔 🤔
  • 47. @d_ir Question: How well do snapshots fit our definition of developer tests? Hinderance Help Bad tests Great tests No tests
  • 48. @d_ir Finish Tests can overcome your fear of change and help you work faster. What about the fear of getting started? Yes, you will write bad tests when you start. You just have to keep going. Keep practicing. You’ll improve.
  • 49. @d_ir Finish Tests can overcome your fear of change and help you work faster. What about the fear of getting started? Yes, you will write bad tests when you start. You just have to keep going. Keep practicing. You’ll improve. Thank you Daniel Irvine