DEV Community

Oliver Davies
Oliver Davies

Posted on • Originally published at oliverdavies.uk on

Running tests in parallel with Paratest

Something that I've recently added to my PHP projects is Paratest.

It adds parallel testing to PHPUnit, so your tests will be run in parallel instead of sequentially.

For the example module in my automated testing in Drupal email course, using Paratest reduces the execution time from ~16 seconds to ~8 seconds.

In a client project with 136 tests, it reduces the time from four and a half minutes to less than two minutes.

This is a big improvement just from running a single Composer command to add Paratest.

There's also an open issue for using it for Drupal core's tests, which is something I'll keep an eye on and will look to contribute to.

P.S. Do you need immediate access to an expert Drupal Developer? With my Drupal development subscription, make unlimited requests for a fixed monthly price in less time than posting to a job board!

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay