CakePHP3: Improve performance of your fixture based tests on MySQL.
Clone or download
dakota Merge pull request #12 from JoepRoebroek/patch-1
Apply speedup to fixtures with no records as well
Latest commit 12d5be4 Aug 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/TestSuite/Fixture Update ChecksumTestFixture.php Jan 25, 2018
.editorconfig add initial code Jul 4, 2016
.gitignore add initial code Jul 4, 2016
LICENSE.txt add initial code Jul 4, 2016
README.md Update README.md Jul 5, 2016
composer.json fix auto-load path Jul 4, 2016

README.md

Latest Stable Version

Installation

For CakePHP 3.x compatible version:

composer require friendsofcake/fixturize

Introduction

The fixturize plugin will help improve performance of your fixture based tests.

This plugin currently only work with MySQL/MariaDB/Percona databases.

Usage

Instead of

use Cake\TestSuite\Fixture\TestFixture;

simply use

use FriendsOfCake\Fixturize\TestSuite\Fixture\ChecksumTestFixture as TestFixture;

Re-run your tests and enjoy the speed!

Real life improvements

Who # Tests Before After
Bownty Content Importer 364 15s 5s
Apacta REST API (110 fixtures) 318 180s 30s

Feel free to submit your own results above

Bugs

If you happen to stumble upon a bug, please feel free to create a pull request with a fix (optionally with a test), and a description of the bug and how it was resolved.

You can also create an issue with a description to raise awareness of the bug.

Features

If you have a good idea for a Fixturize feature, please join us on IRC and let's discuss it. Pull requests are always more than welcome.

Support / Questions

You can join us on IRC in the #CakePHP channel for any support or questions.