When the internals are complex, you’ll have to test your system to ensure reliability. (generated by Midjourney)

Testing is not About the Tools

Yes, there are frameworks like Jest, Mocha, and Jasmine. There are even test runners like Karma; however, without proper Behavior-Driven Development and Test Driven Development foundation, you will not benefit from those tools.

Testing is all about the mindset.

At the very least, you’ll need to understand the terminology like unit tests, stubs, spies, and more important than that, you’ll have to figure out why you need testing (“unit testing”—see what I did there?) and how to implement various testing strategies.

There are several different testing types and strategies that youneed to be aware of as well. For starters, you might want to learn about unit tests, integration tests, functional tests, acceptance tests, performance tests, smoke tests, and exploratory testing.

How Much Testing is Enough Testing?

How much testing is enough testing?

That’s an important question too. The answer to it depends on your situation:

For instance, if you are a startup, rapidly prototyping at an insane cadence, writing tests may (may” is the keyword here) be counter-productive.

Per contra, if you are a well-established organization with remotely collaborating teams and business units, or if you are open-sourcing a library, then not writing tests will be equivalent to being back-kicked by a donkey in the guts—not fun!

Learning Resources

Here are some reference materials that can help in your journey:

Conclusion

This article provided you with some bedtime reading material on test-driven development.

Testing is a vast field, and there is a lot to explore. Hence, the resources here are by no means a definitive list. Instead, they are hand-curated for you as a starting point to build a solid testing foundation and mindset. Once you consume them, you’ll have a much better understanding of where to go next.

Until next time… May the source be with you 🦄.