D
D
Dmitry2017-10-03 12:13:39
PHP
Dmitry, 2017-10-03 12:13:39

Why are phpunit tests taking so long to run?

There is a project, programmers wrote functional tests, we run them on the server through
vendir/bin/phpunit
Tests run for about 2 hours + -
If I run each test in a cycle:

for i in `find ./tests/ -type f -name *Test*`; do echo $i; vendor/bin/phpunit --stop-on-failure $i; done

Work out for 10-15 minutes. With this approach, the objects will not crash when they are launched through the same Jenkins, or rather the test will fall, but since they are in the cycle, the testing will go further, and the build will not be faked. I don’t know at all in which direction to dig - why it can take so long to run.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Kokoulin, 2017-10-04
@Kokoulin

You need to look at the tests, and their number
Before each test , the database is usually dropped and refilled
Maybe the server is slow
I have 70 tests running for about 5-7 minutes
1gb memory, 1 processor core,

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question