dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 441 forks source link

Multiple PHPUNIT plugin definitions ignored #1013

Open benr77 opened 9 years ago

benr77 commented 9 years ago

Hi,

I have a lot of functional tests in my project. Memory usage of PHPUnit is quite high - well over 1GB.

What I have done is split my tests in to test suites - this way I can break down the tests in to smaller groups, and this brings the memory consumption down for each group as PHPUnit starts all over again when you move on to the next test suite. This all works fine from the command line.

However, in my phpci.yml I have then defined the phpunit plugin 3 times, once for each test suite as follows:

test:
  php_unit:
    config:
      - "app/phpunit.xml"
    args: "--testsuite Group1"
  php_unit:
    config:
      - "app/phpunit.xml"
    args: "--testsuite Group2"
  php_unit:
    config:
      - "app/phpunit.xml"
    args: "--testsuite Group3"

The idea of course is that phpci can then just run the three tests suites one after another.

The problem is that only the first call is run and only tests from the test suite Group1 are executed.

Can it be configured to run multiple phpunit plugin definitions?

Thanks

eelkevdbos commented 9 years ago

Inside the config key, you can list multiple xml files but not a list of arguments.

Defining the php_unit key three times will not work for it acts like an associative array.

You could try the desired behavior by using the shell plugin (https://www.phptesting.org/wiki/Shell-Plugin).