When To Use Jest Snapshots
Snapshots are great tool when used for the correct job. However, they are frequently misused. In this article, I will show you the best use-cases of Snapshots.
Becoming a Testing Hero will not need a spider bite or a pocket full of kryptonite. How to become one? Discover and master the set of Testing Best Practices (TDD). It’s like approaching the next level of every game - from a random user who just plays a game to a Pro who creates the reality.
This article will focus on E2E testing. E2E tests are conducted by a robot, that is mimicking user's interactions with the app. In my React Native application, I use Detox for testing selected user paths. Detox is a library that lets us prepare Gray Box tests.
In part 1 we have covered antipatterns related to stubbing and problem with implementation details that are a overcomplicated just for the sake of being super easy to tests. In second part we are going to focus more on tests themselves.
When preparing our test suite we might be tempted to make some shortcuts that will render our tests less readable, comprehensible or will significantly decrease the flexibility of further implementation. Below, I try to list some of the most commonly seen techniques we should avoid to keep our test suite healthy.
Some clients ask why their application needs to be covered with automated tests. The basic truth is that if you want to ensure quality on your application it should be properly tested and both manual and automated tests are essential when you want to achieve that goal.