Adopting a culture of testing on mobile is hard. If you already work with teams that are used to riding on the highs of banging out awesome features f

How I Learned to Stop Worrying and Love the Tests — Squarespace / Engineering

submited by
Style Pass
2021-07-15 02:00:02

Adopting a culture of testing on mobile is hard. If you already work with teams that are used to riding on the highs of banging out awesome features for an app and writing few to no tests, asking them to start writing tests outright might be the equivalent of a record scratch. The thought of slowing down to learn how to write tests and change the way we write code to support testing, at first, is scary. After all, we want to continue to deliver value to our customers quickly and make them happy, and adding tests initially might feel like added pressure to that!

These are all valid opinions! However, as you might tell by the title of this article, I’ve grown to love writing automated tests! In my experience, adopting a culture of testing takes patience, support, a desire to learn, and the will to challenge and be challenged. When introducing automated testing to engineers, I usually share my own initial experience.

Mobile apps have complex state, view lifecycle, callbacks, and other things that make testing hard. The web has been around a lot longer than mobile and enjoys the benefits of long-established tooling and practices for testing. Because the world of mobile testing is relatively new, it takes time and patience to determine which best practices will work for your team. A former boss and mentor taught me how to approach test-driven development for iOS. As a mobile developer who didn’t have much prior knowledge or experience with writing tests, learning how and why to change the way I wrote my code to support testing was quite the mind-bender. My arc basically looked something like this:

Leave a Comment
Related Posts