Testing Principles

Kent C. Dodds

Utah

1 wife, 4 kids

PayPal, Inc.

@kentcdodds

Please Stand...

if you are able

What this workshop is

  • Fundamentals behind tests and testing frameworks

  • Distinctions of different forms of testing

  • Writing unit/integration and end-to-end tests

  • Test doubles (mocks/stubs/etc.)

  • Use TDD to write new features and toย find and fix bugs

  • Core principles of testing to ensure your tests give you the confidence you need

What this workshop is not

  • Technology-specific
  • How to configure tools
  • Free of trade-offs
  • Long presentation
  • Covering all forms of testing

Let's
Get
STARTED!

Setup

If you can, do it now, even if you've already done it...

git clone https://github.com/kentcdodds/testing-workshop.git

cd testing-workshop

npm run setup --silent

What kind of bugs are there?

Business Logic ๐Ÿ•ท

Security ๐Ÿ•ท

Accessibility ๐Ÿœ

User Interface ๐Ÿž

Performance ๐Ÿ›

Regression ๐Ÿž

Internationalization ๐Ÿ•ท

Integration ๐Ÿœ

Scaling ๐Ÿ›

How do we prevent bugs?

  1. Static Types: Flow / TypeScript
  2. Linting: ESLint
  3. Testing: ??

What kinds of testing can we do?

Unit Testing

Regression Testing

Integration Testing

E2E Testing

Smoke Testing

Usability Testing

i18n Testing

Penetration Testing

User Acceptance Testing

Performance Testing

A/B Testing

a11y Testing

Stress Testing

Fuzz Testing

What is a Unit Test?

What is an Integration Test?

What is an End to End Test?

Where do we focus our time?

๐Ÿš— Test Driven Development ๐ŸŽ

Red

Green

Refactor

๐Ÿ› Fixing Bugs ๐Ÿœ

Bug

Find Code

Write Test

Fix Test

Snapshot testing

๐Ÿ“ธ

Resources

  • Resource Name and Link - Who From - Description
  • Resource Name and Link - Who From - Description
  • Resource Name and Link - Who From - Description

Thank you!

Testing Practices and Principles

By Kent C. Dodds

Testing Practices and Principles

The goal of a test is to increase your confidence that the subject of your test is functioning the way it should be. Not all tests provide the same level of confidence (some provide very little confidence at all). If youโ€™re not doing things correctly, you could be wasting your time and giving yourself a false sense of security (even worse than having no tests at all).

  • 54
Loading comments...

More from Kent C. Dodds