ConTejas Code

Artem Zakharchenko: How to Write Epic Automated Tests, Mock ServiceWorker, Open Source


Listen Later

Don't forget to share and subscribe. Follow along on 𝕏 at https://x.com/tejaskumar_


Links


- Codecrafters (sponsor): https://tej.as/codecrafters

- THAT Conference (partner): https://www.thatconference.com

- Artem on 𝕏: https://x.com/kettanaito

- Epic Web: https://epicweb.dev

- The Golden Rule of Assertions: https://www.epicweb.dev/the-golden-rule-of-assertions

- The True Purpose of Testing: https://www.epicweb.dev/the-true-purpose-of-testing


Takeaways


- Automated testing is crucial for writing better and more reliable software.

- Testing helps developers describe the intention behind the code and ensure that the implementation meets that intention.

- Starting with a minimal functional prototype and then writing tests to verify its behavior is a practical approach to testing.

- Mocking is a technique that helps establish testing boundaries and allows developers to focus on specific behaviors in their tests. Mocking allows you to model different scenarios and create the desired context for tests.

- The testing setup phase is crucial and often underappreciated.

- The golden rule of assertion states that a test should only fail if the intention behind the system is not met.

- Mock Service Worker (MSW) is an API mocking library that uses the Service Worker API to intercept requests and supports both browser and Node.js environments. Open source sustainability is challenging, but financial support from companies can make it more sustainable.

- MSW has gained financial support through programs and partnerships, allowing for further development and support for users.

- Concurrent testing support in MSW allows for better performance and avoids shared state issues.

- Async local storage is a powerful tool in Node.js that helps solve concurrency issues in testing.

- Setting limitations and principles for open source projects helps maintain focus and manage the scope.

- Saying no to contributions is important to maintain the project's vision and scope.

- Adding tests to projects, even small ones, can provide value and ensure reliability.

- The future of testing lies in making it more accessible and having a testing strategy in place.

- Balancing speed and quality in testing requires finding a minimal viable test suite that provides value.

- Automated testing is crucial for ensuring software works reliably in different circumstances.

- The future of testing involves making it more accessible and promoting its importance in software development.


Chapters


00:00 Artem Zakharchenko

08:13 The Importance of Automated Testing

15:37 Artem's Role at Epic Web and Testing Workshops

27:02 Future Plans for Epic Web and Workshops

28:45 Understanding Mocking and Mocking Strategies

31:51 Introduction to Mocking and Modeling Scenarios

33:43 The Broad Use Case of Mocking

35:20 Finding the Right Balance in Mocking

36:40 The Golden Rule of Assertion

39:19 Creation and Iterative Process of Mock Service Worker (MSW)

45:10 Adding Support for Node.js in MSW

52:47 Mocking WebSockets with MSW

01:04:54 Open Source and Sustainability

01:05:43 Supporting MSW

01:07:16 Solving Issues with MSW

01:08:22 Concurrent Testing Support

01:10:38 Using Async Local Storage

01:13:30 Strategies for Open Source Maintainers

01:14:27 Balancing Work-Life and Open Source

01:18:50 Saying No to Contributions

01:26:03 Balancing Speed and Quality in Testing

01:29:00 Adding Automated Testing to Projects

01:33:49 The Future of Testing

Hosted on Acast. See acast.com/privacy for more information.

...more
View all episodesView all episodes
Download on the App Store

ConTejas CodeBy Tejas Kumar

  • 5
  • 5
  • 5
  • 5
  • 5

5

8 ratings


More shows like ConTejas Code

View all
Hanselminutes with Scott Hanselman by Scott Hanselman

Hanselminutes with Scott Hanselman

377 Listeners

Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

Software Engineering Radio - the podcast for professional software developers

273 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

285 Listeners

The Twenty Minute VC (20VC): Venture Capital | Startup Funding | The Pitch by Harry Stebbings

The Twenty Minute VC (20VC): Venture Capital | Startup Funding | The Pitch

508 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

631 Listeners

Soft Skills Engineering by Jamison Dance and Dave Smith

Soft Skills Engineering

275 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

989 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

7,844 Listeners

Practical AI by Practical AI LLC

Practical AI

187 Listeners

The Stack Overflow Podcast by The Stack Overflow Podcast

The Stack Overflow Podcast

63 Listeners

Last Week in AI by Skynet Today

Last Week in AI

282 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

354 Listeners

Latent Space: The AI Engineer Podcast by swyx + Alessio

Latent Space: The AI Engineer Podcast

65 Listeners

The AI Daily Brief (Formerly The AI Breakdown): Artificial Intelligence News and Analysis by Nathaniel Whittemore

The AI Daily Brief (Formerly The AI Breakdown): Artificial Intelligence News and Analysis

428 Listeners

AI + a16z by a16z

AI + a16z

32 Listeners