Issue Task Closed

#79509Add group feature to functional tests

Manuel Selbach 01/26/17, 20:51 updated 10/02/18, 11:02

Description

To increase the performance of functional tests (as excluded groups would not be processed at all, not even be listed) and to ignore tests for certain DBMS the option “@group” should be used in the annotation of a test.

Example:

/**
 * @test
 *
 * @group mysql
 */
public function collectGarbageWorksWithEmptyTableWithMysql()
{
    $subject = $this->getSubjectObject(true);
    $subject->collectGarbage();
}

To exclude a group follow the these examples:

// to exclude tests for MySQL
bin/phpunit -c ./components/testing_framework/core/Build/FunctionalTests.xml  --exclude-group mysql

// to exclude tests for MySQL and PostgreSQL
bin/phpunit -c ./components/testing_framework/core/Build/FunctionalTests.xml  --exclude-group mysql postgresql

Reviews 1