PHPChunkit, Distributed Unit Testing Solution

0

If you have a really large or huge amount of Unit testing in your project, and you are looking for a solution to easily manage CI/CD for you, PHPChunkit be could what you are looking for ! The solution is not really new, written by Jonathan H. Wage, but seems unknown to a large portion of the PHP community.

As its name indicates, PHPChunkit is a PHPUnit test runner with test chunking capabilities. The primary feature is test chunking and database sandboxing which gives you the ability to run your tests in parallel chunks on the same server or across multiple servers.

In order to run functional tests in parallel on the same server, you need to have a concept of database sandboxing. You are responsible for implementing the sandbox preparation, database creation, and sandbox cleanup. PHPChunkit provides a framework for you to hook in to so you can prepare your application environment sandbox.

Imagine you have 100 tests and each test takes 1 second. When the tests are ran serially, it will take 100 seconds to complete. But if you split the 100 tests in to 10 even chunks and run the chunks in parallel, it will in theory take only 10 seconds to complete.

CI/CD process could be time-consuming for large projects, and sometimes we are forced to pick one of quality of work or faster time execution, but why not having both ?

PHPChunkit provides you with a framework to distribute Unit testing, so you are responsible for implementing the sandbox preparation, database creation and sandbox cleanup processes by adding EventDispatcher listeners.

Documentation and samples are provided to guide through the implementation of PHPChunkit in your CI/CD environment. A demo is also available to see how it can be integrated in to an existing PHPUnit project.

More information and download at https://github.com/jwage/phpchunkit

LEAVE A REPLY

Please enter your comment!
Please enter your name here