Find the Commit that Broke the Tests with `git rebase –exec`

Nice tip by Kamran Ahmed: Find the commit that broke the tests $ git rebase -i –exec "yarn test" d294ae9 This will run "yarn test" on all the commits between d294ae9 and HEAD and stop on the commit where the tests fail — Kamran Ahmed (@kamranahmedse) February 2, 2020 If you want to go back […]

Testing React Hooks With Enzyme and React Testing Library

Solid intro to test your React apps with either Enzyme or React Testing Library: In this tutorial, we will look at how to do that by making use of a to-do application built with hooks. We’ll cover writing of tests using Ezyme and React Testing Library, both of which are able to do just that. […]

Run your tests using Jest & Puppeteer with jest-puppeteer

With jest-puppeteer – and its included expect-puppeteer assertion library – it’s possible to use Puppeteer within your Jest tests. Writing integration test can be done using Puppeteer API but it can be complicated and hard because API is not designed for testing. To make it simpler, an expectPage() is automatically installed and available, it provides […]

Automatic visual diffing with Puppeteer

A few years ago we got Wraith and Huxley to perform visual regression testing. Monica Dinculescu has created a likewise thingy, powered by Puppeteer: I did a little song-and-dance that sets up Puppeteer, takes screenshots of your app (like, all the routes you care about), and then compares them to the “golden” ones. If they […]

End-to-end Tests that Don’t Suck with Puppeteer

Good introduction to using Puppeteer for your e2e tests: One of the most popular tools for e2e testing is Selenium, which is a tool for automating web browsers. Selenium sounds cool in theory: write one set of tests that run on all browsers and devices, woohoo! Jk. In practice, Selenium tests are slow, brittle, and […]

Gremlins.js – Monkey testing library for web apps and Node.js

gremlins.js is a monkey testing library written in JavaScript, for Node.js and the browser. Use it to check the robustness of web applications by unleashing a horde of undisciplined gremlins. I especially like the syntax to start a test: var horde = gremlins.createHorde(); horde.unleash(); And oh, make sure you don’t run any tests after midnight […]

Detox: E2E Testing in React Native

High velocity native mobile development requires us to adopt continuous integration workflows, which means our reliance on manual QA has to drop significantly. Detox tests your mobile app while it’s running in a real device/simulator, interacting with it just like a real user. Here’s a sample test for a login screen: describe(‘Login flow’, () => […]