Summary:
This episode of the Bikeshed Podcast features a discussion about software testing, with a focus on automated testing in frontend development. The hosts, Scott Kaye, Matt Hamlin, and Dillon Curry, explore various testing methodologies, tools, and their value in different contexts. They delve into the nuances of unit, integration, and end-to-end testing, and the trade-offs involved in choosing one over the other. The discussion also touches on the role of mocking, dependency injection, and the importance of balancing test coverage with development speed. They each share personal experiences from their development career on testing, and their favorite tools.
Key Discussion Points:
- Value of Testing: Testing is often not enjoyable in the short term, but provides significant long-term value by preventing bugs and providing confidence in code changes.
- Unit Testing vs. Integration/End-to-End: Unit testing is valuable for specific functions, while integration and end-to-end tests are better for critical user flows. However, end-to-end tests can be flaky.
- Mocking: The overuse of mocking can reduce the value of tests. Dependency injection is viewed more favorably than mocking, though they serve similar purposes.
- Test Coverage: Aiming for 100% test coverage may not be efficient; focus on testing essential product features. Consider the time and effort spent on tests versus the value they provide.
- Testing in Production: The hosts explore the concept of testing in production, with tools like Datadog synthetics. This allows the team to assess the experience for end-users in production.

- Test-Driven Development (TDD): TDD may not always be practical, especially when developing new features with unknown outputs. Writing tests after the feature is more common in these scenarios.
- Proof of Concept (POC): Developing a proof of concept outside the main application to validate an idea before integrating it is valuable.
- Accessibility Testing: The importance of accessibility testing is discussed, but integrating it into the development process is important.
- Component Tests: A discussion of testing in isolation to ensure true browser experience. Component testing will ensure the system will run in the browser as expected.
- Code and Test Half-Life: Tests lose value over time as codebase patterns change. It's important to re-evaluate their relevance.
Spicy Takes:
Tune in to the episode to hear all our spicy takes on testing!
Misc. References:
Scott shared a few Neovim related projects that he has been working with: