Member-only story

Leverage On Redux To Execute Your Tests 100x Times Faster

How separating the logic from the view can accelerate your test speed, test quality, and productivity.

David Rodenas PhD
11 min read6 days ago
Prompted and edited by the author.

In the previous article, I showed a technique for writing React components in a way that could be tested up to 100 times faster without losing accuracy. But it turns out that the same can also be achieved with Redux, and no additional pattern is needed.

Running with React is unacceptable

One of the things I’ve seen that most affects the speed and quality of development is the ability to run tests quickly. I’ve discussed this in many previous articles, but it’s not just coming from me; studies like Accelerate corroborate this perception.

And the thing is, the faster the tests run, the faster you get feedback, and the more opportunities there are to improve the code and product quality. And reaching a critical point, we can manage to enter a virtuous cycle.

The problem, despite not seeming so, is that testing with React is too slow.

In the previous article, after running the tests, I discovered that executing with React was about 100 times slower. That’s too much, and I wasn’t expecting it! And this time, while preparing this…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

David Rodenas PhD
David Rodenas PhD

Written by David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

Responses (3)

Write a response

Your article isn’t just informative—it’s a deep exploration of the topic that encourages the reader to reflect and analyze it further. Well done.

Nicely done.

I was here for the beginning of the React+Redux (Flux) revolution, and web dev was already benefitting from MV* separations. Unit tests (non mock, non UI) were still normal. TDD was a thing - a Good Thing because it started with the…

The thing that takes a long time in tests with Redux is setting up a store that is able to operate without actually calling the backend. And by that I mean the developer time to analyze exactly what state is needed for a specific test, and then…