ci/testing work: categorize tests via phpunit @group tags

This commit is contained in:
odain
2021-02-04 15:07:44 +01:00
parent 54f8ef924f
commit d7c7ef8332
22 changed files with 49 additions and 1 deletions

View File

@@ -73,7 +73,6 @@ class ItopDataTestCase extends ItopTestCase
protected function setUp()
{
parent::setUp();
//require_once(APPROOT.'/application/startup.inc.php');
require_once(APPROOT.'application/utils.inc.php');
$sEnv = 'production';

View File

@@ -8,6 +8,9 @@ define('NUM_PRECISION', 2);
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
/**
* @group itopRequestMgmt
* @group itopVirtualizationMgmt
* @group itopServiceMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -8,6 +8,7 @@ define('NUM_PRECISION', 2);
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
/**
* @group itopRequestMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -13,6 +13,7 @@ use SetupUtils;
use utils;
/**
* @group itopRequestMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled
@@ -50,6 +51,7 @@ class OQLToSQLNestedSelectTest extends ItopDataTestCase
}
/**
* @group itopConfigMgmt
* @dataProvider OQLSelectProvider
* @depends testOQLSetup
*

View File

@@ -13,6 +13,9 @@ use SetupUtils;
use utils;
/**
* @group itopRequestMgmt
* @group itopVirtualizationMgmt
* @group itopServiceMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -42,6 +42,8 @@ use DBSearch;
use Dict;
/**
* @group itopRequestMgmt
* @group itopServiceMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -32,6 +32,7 @@ use Combodo\iTop\Application\Search\CriterionParser;
use Combodo\iTop\Test\UnitTest\ItopTestCase;
/**
* @group itopRequestMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -28,6 +28,7 @@ use DBObjectSearch;
use Exception;
/**
* @group itopRequestMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -82,6 +82,7 @@ class DBObjectTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* @covers DBObject::GetOriginal
*/
public function testGetOriginal()

View File

@@ -28,6 +28,7 @@ class DBSearchCommitTest extends ItopDataTestCase
const USE_TRANSACTION = false;
/**
* @group itopFaqLight
* @throws \CoreException
* @throws \MissingQueryArgument
* @throws \MySQLException
@@ -59,6 +60,7 @@ class DBSearchCommitTest extends ItopDataTestCase
}
/**
* @group itopFaqLight
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \MissingQueryArgument

View File

@@ -7,6 +7,7 @@ use Combodo\iTop\Test\UnitTest\ItopTestCase;
use DBSearch;
/**
* @group itopRequestMgmt
* Class DBSearchIntersectTest
*
* @package Combodo\iTop\Test\UnitTest\Core

View File

@@ -7,6 +7,7 @@ use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
use DBSearch;
/**
* @group itopServiceMgmt
* Class DBSearchIntersectTest
*
* @package Combodo\iTop\Test\UnitTest\Core

View File

@@ -37,6 +37,7 @@ use FunctionExpression;
/**
* @group itopStorageMgmt
* Tests of the DBSearch class.
* <ul>
* <li>MakeGroupByQuery</li>
@@ -62,6 +63,7 @@ class DBSearchTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* @dataProvider UReqProvider
* @param $iOrgNb
* @param $iPersonNb
@@ -485,6 +487,7 @@ class DBSearchTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* @throws \MySQLException
* @throws \OQLException
*/
@@ -660,6 +663,7 @@ class DBSearchTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* @throws \CoreException
* @throws \MissingQueryArgument
* @throws \MySQLException

View File

@@ -31,6 +31,7 @@ class MetaModelTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* @covers MetaModel::ApplyParams()
* @dataProvider ApplyParamsProvider
*

View File

@@ -23,6 +23,9 @@ class OQLParserTest extends ItopDataTestCase
const USE_TRANSACTION = false;
/**
* @group iTopChangeMgt
* @group itopConfigMgmt
* @group itopRequestMgmt
* @dataProvider NestedQueryProvider
*
* @param $sQuery

View File

@@ -19,6 +19,7 @@ use OqlInterpreter;
use utils;
/**
* @group itopStructure
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled
@@ -46,6 +47,9 @@ class OQLTest extends ItopDataTestCase
}
/**
* @group iTopChangeMgt
* @group itopConfigMgmt
* @group itopRequestMgmt
* @dataProvider NestedQueryProvider
*
* @param $sQuery
@@ -74,6 +78,7 @@ class OQLTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* @dataProvider GoodQueryProvider
* @depends testOQLSetup
*
@@ -213,6 +218,7 @@ class OQLTest extends ItopDataTestCase
}
/**
* @group itopRequestMgmt
* Needs actual datamodel
* @depends testOQLSetup
*
@@ -363,6 +369,9 @@ class OQLTest extends ItopDataTestCase
}
/**
* @group iTopChangeMgt
* @group itopConfigMgmt
* @group itopRequestMgmt
* @dataProvider MakeSelectQueryProvider
* @param $sOQL
* @param $sExpectedExceptionClass

View File

@@ -17,6 +17,7 @@ use MetaModel;
use TagSetFieldData;
/**
* @group itopFaqLight
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled
@@ -102,6 +103,7 @@ class TagSetFieldDataTest extends ItopDataTestCase
}
/**
* @group itopFaqLight
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \Exception
@@ -190,6 +192,7 @@ class TagSetFieldDataTest extends ItopDataTestCase
}
/**
* @group itopFaqLight
* Test that tag code cannot be modified if used
*
* @throws \CoreException
@@ -244,6 +247,9 @@ class TagSetFieldDataTest extends ItopDataTestCase
static::assertFalse(true);
}
/**
* @group itopFaqLight
*/
public function testMaxTagsAllowed()
{
/** @var \AttributeTagSet $oAttDef */

View File

@@ -30,6 +30,7 @@ use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
use UserRights;
/**
* @group itopRequestMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -34,6 +34,8 @@ use ormLinkSet;
/**
* @group itopRequestMgmt
* @group itopConfigMgmt
* Tests of the ormLinkSet class using N-N links between FunctionalCI and Contact
*
* @runTestsInSeparateProcesses

View File

@@ -36,6 +36,7 @@ use ormTagSet;
define('MAX_TAGS', 12);
/**
* @group itopFaqLight
* Tests of the ormTagSet class
*
* @runTestsInSeparateProcesses

View File

@@ -31,6 +31,9 @@ use Exception;
/**
* @group itopVirtualizationMgmt
* @group itopConfigMgmt
* @group itopTickets
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled

View File

@@ -7,6 +7,7 @@ use Exception;
/**
* @group itopRequestMgmt
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
* @backupGlobals disabled