FriendsOfCake / fixturize

CakePHP: Improve performance of your fixture based tests on MySQL.
MIT License
24 stars 14 forks source link

backporting to CakePHP 2.x #4

Closed bancer closed 7 years ago

bancer commented 7 years ago

See https://github.com/cakephp/cakephp/pull/10985#issuecomment-320225098

@lorenzo You may want to pull to another branch though.

lorenzo commented 7 years ago

@bancer did it work for you?

bancer commented 7 years ago

Worked on a small test class (7 tests, 56 fixtures). I would need to test more in a bigger project on Monday.

tersmitten commented 7 years ago

Works for us :-) Timed in my local development machine (vagrant).

Tests: 820, Assertions: 7131, Fixtures: 107

Before

Time: 8.44 minutes, Memory: 99.79MB

After

Time: 6.52 minutes, Memory: 98.78MB
tersmitten commented 7 years ago

On our build server it is about 50 percent faster.

4 min 23 sec versus 2 min 35 sec

josegonzalez commented 7 years ago

I changed the merge base to a 2.x branch for you, @lorenzo :)

bancer commented 7 years ago

The performance has really improved. We have a batch of all controller tests.

Without Fixturize:

Time: 19.54 minutes, Memory: 344.75MB

OK, but incomplete or skipped tests!
Tests: 948, Assertions: 3505, Incomplete: 56, Skipped: 9.

With Fixturize:

Time: 8.3 minutes, Memory: 346.50MB

OK, but incomplete or skipped tests!
Tests: 948, Assertions: 3505, Incomplete: 56, Skipped: 9.

In total we have approx. 180 fixtures but not all of them are used in every test class.

lorenzo commented 7 years ago

Thanks @bancer