Use testsuite option instead of group for Selenium tests
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
10b3ead050
commit
58351b861c
2
.github/workflows/mutation-tests.yml
vendored
2
.github/workflows/mutation-tests.yml
vendored
@ -64,7 +64,7 @@ jobs:
|
||||
|
||||
- name: Collect coverage report
|
||||
run: |
|
||||
composer run phpunit -- --exclude-group selenium --stop-on-failure
|
||||
composer run phpunit -- --testsuite unit --stop-on-failure
|
||||
|
||||
- name: Infection
|
||||
if: ${{ github.base_ref != '' }}
|
||||
|
||||
2
.github/workflows/test-selenium.yml
vendored
2
.github/workflows/test-selenium.yml
vendored
@ -120,7 +120,7 @@ jobs:
|
||||
TESTSUITE_DATABASE_PREFIX: "selenium"
|
||||
TESTSUITE_SELENIUM_HOST: "127.0.0.1"
|
||||
TESTSUITE_SELENIUM_PORT: "4444"
|
||||
run: ./vendor/bin/phpunit --group selenium --verbose --debug --no-coverage --stop-on-skipped
|
||||
run: ./vendor/bin/phpunit --testsuite selenium --verbose --debug --no-coverage --stop-on-skipped
|
||||
- name: Output logs and stop server
|
||||
env:
|
||||
CI_MODE: selenium
|
||||
|
||||
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
@ -17,13 +17,13 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { php-version: '7', arch: 'amd64', exclude-phpunit-groups: 'selenium,extension-iconv' }
|
||||
- { php-version: '7', arch: 'arm64v8', exclude-phpunit-groups: 'selenium,extension-iconv' }
|
||||
- { php-version: '7', arch: 'arm32v7', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'arm32v6', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'i386', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'ppc64le', exclude-phpunit-groups: 'selenium,extension-iconv' }
|
||||
- { php-version: '7', arch: 's390x', exclude-phpunit-groups: 'selenium,extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'amd64', exclude-phpunit-groups: 'extension-iconv' }
|
||||
- { php-version: '7', arch: 'arm64v8', exclude-phpunit-groups: 'extension-iconv' }
|
||||
- { php-version: '7', arch: 'arm32v7', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'arm32v6', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'i386', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' }
|
||||
- { php-version: '7', arch: 'ppc64le', exclude-phpunit-groups: 'extension-iconv' }
|
||||
- { php-version: '7', arch: 's390x', exclude-phpunit-groups: 'extension-iconv,32bit-incompatible' }
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Write script
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
apk add --update --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/testing php\$V-pecl-pcov && \
|
||||
composer update && \
|
||||
./scripts/generate-mo && \
|
||||
php -d memory_limit=512M ./vendor/bin/phpunit --exclude-group=%s" \
|
||||
php -d memory_limit=512M ./vendor/bin/phpunit --testsuite unit --exclude-group=%s" \
|
||||
"${{ matrix.php-version }}" "${{ matrix.exclude-phpunit-groups }}" > ./do-tests.sh
|
||||
- name: Setup multi arch support
|
||||
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
@ -67,7 +67,7 @@ jobs:
|
||||
php-version: ["7.2", "7.3", "7.4", "8.0"]
|
||||
experimental: [false]
|
||||
os: [ubuntu-latest]
|
||||
phpunit-options: ['--exclude-group selenium']
|
||||
phpunit-options: ['--testsuite unit']
|
||||
include:
|
||||
- php-version: '8.1'
|
||||
experimental: true
|
||||
@ -161,7 +161,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: composer install
|
||||
- name: Run php tests
|
||||
run: composer run phpunit -- --exclude-group selenium
|
||||
run: composer run phpunit -- --testsuite unit
|
||||
- name: Send coverage
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<property name="source_comma_sep" value="."/>
|
||||
<property environment="env"/>
|
||||
<property name="env.PHPUNIT_XML" value="phpunit.xml.dist"/>
|
||||
<property name="env.PHPUNIT_ARGS" value="--exclude-group selenium"/>
|
||||
<property name="env.PHPUNIT_ARGS" value="--testsuite unit"/>
|
||||
|
||||
<target name="clean" description="Clean up and create artifact directories">
|
||||
<delete dir="${basedir}/build/api"/>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="default">
|
||||
<testsuite name="unit">
|
||||
<directory suffix="Test.php">test/classes</directory>
|
||||
</testsuite>
|
||||
<testsuite name="selenium">
|
||||
|
||||
@ -453,7 +453,7 @@ if [ $do_test -eq 1 ] ; then
|
||||
backup_vendor_folder
|
||||
# Generate an autoload for test class files (and include dev namespaces)
|
||||
composer dump-autoload --dev || php -r "echo 'Requires: composer >= v2.1.2' . PHP_EOL; exit(1);"
|
||||
"${TEMP_PHPUNIT_FOLDER}/vendor/bin/phpunit" --no-coverage --exclude-group selenium
|
||||
"${TEMP_PHPUNIT_FOLDER}/vendor/bin/phpunit" --no-coverage --testsuite unit
|
||||
test_ret=$?
|
||||
if [ $do_ci -eq 1 ] ; then
|
||||
cd ../..
|
||||
|
||||
@ -10,7 +10,6 @@ use function array_push;
|
||||
use function trim;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class ChangePasswordTest extends TestBase
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class CreateDropDatabaseTest extends TestBase
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class CreateRemoveUserTest extends TestBase
|
||||
|
||||
@ -11,7 +11,6 @@ use function sleep;
|
||||
use function strtotime;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class EventsTest extends TestBase
|
||||
|
||||
@ -9,7 +9,6 @@ use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
use function sleep;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class OperationsTest extends TestBase
|
||||
|
||||
@ -10,7 +10,6 @@ use function sleep;
|
||||
use function str_replace;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class ProceduresTest extends TestBase
|
||||
|
||||
@ -10,7 +10,6 @@ use function sleep;
|
||||
use function trim;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class QueryByExampleTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Database;
|
||||
use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class StructureTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Database;
|
||||
use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class TriggersTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium;
|
||||
use function sleep;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class ExportTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium;
|
||||
use function sleep;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class ImportTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium;
|
||||
use function sleep;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class LoginTest extends TestBase
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class NormalizationTest extends TestBase
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class ServerSettingsTest extends TestBase
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class SqlQueryTest extends TestBase
|
||||
|
||||
@ -8,7 +8,6 @@ use Facebook\WebDriver\WebDriverKeys;
|
||||
use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class BrowseTest extends TestBase
|
||||
|
||||
@ -9,7 +9,6 @@ use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
use function sleep;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class CreateTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Table;
|
||||
use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class InsertTest extends TestBase
|
||||
|
||||
@ -9,7 +9,6 @@ use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
use function sleep;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class OperationsTest extends TestBase
|
||||
|
||||
@ -7,7 +7,6 @@ namespace PhpMyAdmin\Tests\Selenium\Table;
|
||||
use PhpMyAdmin\Tests\Selenium\TestBase;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class StructureTest extends TestBase
|
||||
|
||||
@ -59,9 +59,6 @@ use const JSON_PRETTY_PRINT;
|
||||
use const JSON_UNESCAPED_SLASHES;
|
||||
use const PHP_EOL;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
*/
|
||||
abstract class TestBase extends TestCase
|
||||
{
|
||||
/** @var RemoteWebDriver */
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class TrackingTest extends TestBase
|
||||
|
||||
@ -5,7 +5,6 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Tests\Selenium;
|
||||
|
||||
/**
|
||||
* @group selenium
|
||||
* @coversNothing
|
||||
*/
|
||||
class XssTest extends TestBase
|
||||
|
||||
Loading…
Reference in New Issue
Block a user