Unify Codeception configs
This commit is contained in:
18
RoboFile.php
18
RoboFile.php
@@ -156,7 +156,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
function testUnit(array $opts=['file' => null, 'xml' => false, 'multisite' => false, 'debug' => false]) {
|
function testUnit(array $opts=['file' => null, 'xml' => false, 'multisite' => false, 'debug' => false]) {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
|
|
||||||
$command = 'vendor/bin/codecept run unit -c codeception.unit.yml';
|
$command = 'vendor/bin/codecept run unit';
|
||||||
|
|
||||||
if($opts['file']) {
|
if($opts['file']) {
|
||||||
$command .= ' -f ' . $opts['file'];
|
$command .= ' -f ' . $opts['file'];
|
||||||
@@ -176,7 +176,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
function testIntegration(array $opts=['file' => null, 'xml' => false, 'multisite' => false, 'debug' => false]) {
|
function testIntegration(array $opts=['file' => null, 'xml' => false, 'multisite' => false, 'debug' => false]) {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
|
|
||||||
$command = 'vendor/bin/codecept run integration -c codeception.integration.yml';
|
$command = 'vendor/bin/codecept run integration';
|
||||||
|
|
||||||
if($opts['multisite']) {
|
if($opts['multisite']) {
|
||||||
$command = 'MULTISITE=true ' . $command;
|
$command = 'MULTISITE=true ' . $command;
|
||||||
@@ -204,7 +204,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
function testCoverage($opts=['file' => null, 'xml' => false]) {
|
function testCoverage($opts=['file' => null, 'xml' => false]) {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
$command = join(' ', array(
|
$command = join(' ', array(
|
||||||
'vendor/bin/codecept run unit -c codeception.unit.yml ',
|
'vendor/bin/codecept run -s acceptance',
|
||||||
(($opts['file']) ? $opts['file'] : ''),
|
(($opts['file']) ? $opts['file'] : ''),
|
||||||
'--coverage',
|
'--coverage',
|
||||||
($opts['xml']) ? '--coverage-xml' : '--coverage-html'
|
($opts['xml']) ? '--coverage-xml' : '--coverage-html'
|
||||||
@@ -270,10 +270,16 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
return $this->_exec('docker-compose down -v --remove-orphans --rmi all');
|
return $this->_exec('docker-compose down -v --remove-orphans --rmi all');
|
||||||
}
|
}
|
||||||
|
|
||||||
function testFailed() {
|
function testFailedUnit() {
|
||||||
$this->loadEnv();
|
$this->loadEnv();
|
||||||
$this->_exec('vendor/bin/codecept build -c codeception.unit.yml');
|
$this->_exec('vendor/bin/codecept build');
|
||||||
return $this->_exec('vendor/bin/codecept run -c codeception.unit.yml -g failed');
|
return $this->_exec('vendor/bin/codecept run unit -g failed');
|
||||||
|
}
|
||||||
|
|
||||||
|
function testFailedIntegration() {
|
||||||
|
$this->loadEnv();
|
||||||
|
$this->_exec('vendor/bin/codecept build');
|
||||||
|
return $this->_exec('vendor/bin/codecept run integration -g failed');
|
||||||
}
|
}
|
||||||
|
|
||||||
function qa() {
|
function qa() {
|
||||||
|
@@ -1,64 +0,0 @@
|
|||||||
actor: Tester
|
|
||||||
paths:
|
|
||||||
tests: tests
|
|
||||||
log: tests/_output
|
|
||||||
data: tests/_data
|
|
||||||
support: tests/_support
|
|
||||||
envs: tests/_envs
|
|
||||||
settings:
|
|
||||||
colors: true
|
|
||||||
memory_limit: 1024M
|
|
||||||
log: true
|
|
||||||
strict_xml: true
|
|
||||||
extensions:
|
|
||||||
enabled:
|
|
||||||
- Codeception\Extension\RunFailed
|
|
||||||
modules:
|
|
||||||
config:
|
|
||||||
WPWebDriver:
|
|
||||||
host: chrome
|
|
||||||
url: 'http://wordpress'
|
|
||||||
browser: chrome
|
|
||||||
port: 4444
|
|
||||||
window_size: '1024x768'
|
|
||||||
restart: true
|
|
||||||
wait: 0
|
|
||||||
adminUsername: admin
|
|
||||||
adminPassword: password
|
|
||||||
adminPath: /wp-admin
|
|
||||||
log_js_errors: true
|
|
||||||
WPLoader:
|
|
||||||
loadOnly: false
|
|
||||||
wpRootFolder: /wp-core
|
|
||||||
dbName: wordpress
|
|
||||||
dbHost: mysql
|
|
||||||
dbUser: wordpress
|
|
||||||
dbPassword: wordpress
|
|
||||||
domain: wordpress
|
|
||||||
tablePrefix: 'mp_'
|
|
||||||
plugins: ['mailpoet/mailpoet.php']
|
|
||||||
activatePlugins: ['mailpoet/mailpoet.php']
|
|
||||||
WPDb:
|
|
||||||
dsn: 'mysql:host=mysql;dbname=wordpress'
|
|
||||||
user: wordpress
|
|
||||||
password: wordpress
|
|
||||||
dump: tests/_data/acceptanceGenerated.sql
|
|
||||||
populate: true
|
|
||||||
cleanup: false
|
|
||||||
url: 'http://wordpress'
|
|
||||||
urlReplacement: true
|
|
||||||
tablePrefix: 'mp_'
|
|
||||||
WPCLI:
|
|
||||||
path: /wp-core
|
|
||||||
throw: true
|
|
||||||
coverage:
|
|
||||||
enabled: true
|
|
||||||
whitelist:
|
|
||||||
include:
|
|
||||||
- lib/*
|
|
||||||
exclude:
|
|
||||||
- lib/Config/PopulatorData/*
|
|
||||||
- lib/Util/Sudzy/*
|
|
||||||
- lib/Util/CSS.php
|
|
||||||
- lib/Util/Helpers.php
|
|
||||||
- lib/Util/XLSXWriter.php
|
|
@@ -1,34 +0,0 @@
|
|||||||
actor: Tester
|
|
||||||
paths:
|
|
||||||
tests: tests
|
|
||||||
log: tests/_output
|
|
||||||
data: tests/_data
|
|
||||||
support: tests/_support
|
|
||||||
envs: tests/_envs
|
|
||||||
settings:
|
|
||||||
bootstrap: _bootstrap.php
|
|
||||||
colors: true
|
|
||||||
memory_limit: 1024M
|
|
||||||
log: true
|
|
||||||
strict_xml: true
|
|
||||||
extensions:
|
|
||||||
enabled:
|
|
||||||
- Codeception\Extension\RunFailed
|
|
||||||
modules:
|
|
||||||
config:
|
|
||||||
Db:
|
|
||||||
dsn: ''
|
|
||||||
user: ''
|
|
||||||
password: ''
|
|
||||||
dump: tests/_data/dump.sql
|
|
||||||
coverage:
|
|
||||||
enabled: true
|
|
||||||
whitelist:
|
|
||||||
include:
|
|
||||||
- lib/*
|
|
||||||
exclude:
|
|
||||||
- lib/Config/PopulatorData/*
|
|
||||||
- lib/Util/Sudzy/*
|
|
||||||
- lib/Util/CSS.php
|
|
||||||
- lib/Util/Helpers.php
|
|
||||||
- lib/Util/XLSXWriter.php
|
|
@@ -14,13 +14,6 @@ settings:
|
|||||||
extensions:
|
extensions:
|
||||||
enabled:
|
enabled:
|
||||||
- Codeception\Extension\RunFailed
|
- Codeception\Extension\RunFailed
|
||||||
modules:
|
|
||||||
config:
|
|
||||||
Db:
|
|
||||||
dsn: ''
|
|
||||||
user: ''
|
|
||||||
password: ''
|
|
||||||
dump: tests/_data/dump.sql
|
|
||||||
coverage:
|
coverage:
|
||||||
enabled: true
|
enabled: true
|
||||||
whitelist:
|
whitelist:
|
@@ -104,7 +104,7 @@ fi
|
|||||||
|
|
||||||
cd /wp-core/wp-content/plugins/mailpoet
|
cd /wp-core/wp-content/plugins/mailpoet
|
||||||
|
|
||||||
/project/vendor/bin/codecept run acceptance -c codeception.acceptance.yml $@
|
/project/vendor/bin/codecept run acceptance $@
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
|
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
|
@@ -2,7 +2,39 @@ actor: AcceptanceTester
|
|||||||
modules:
|
modules:
|
||||||
enabled:
|
enabled:
|
||||||
- \Helper\Acceptance
|
- \Helper\Acceptance
|
||||||
- WPLoader
|
- WPLoader:
|
||||||
- WPWebDriver
|
loadOnly: false
|
||||||
- WPDb
|
wpRootFolder: /wp-core
|
||||||
- WPCLI
|
dbName: wordpress
|
||||||
|
dbHost: mysql
|
||||||
|
dbUser: wordpress
|
||||||
|
dbPassword: wordpress
|
||||||
|
domain: wordpress
|
||||||
|
tablePrefix: 'mp_'
|
||||||
|
plugins: ['mailpoet/mailpoet.php']
|
||||||
|
activatePlugins: ['mailpoet/mailpoet.php']
|
||||||
|
- WPWebDriver:
|
||||||
|
host: chrome
|
||||||
|
url: 'http://wordpress'
|
||||||
|
browser: chrome
|
||||||
|
port: 4444
|
||||||
|
window_size: '1024x768'
|
||||||
|
restart: true
|
||||||
|
wait: 0
|
||||||
|
adminUsername: admin
|
||||||
|
adminPassword: password
|
||||||
|
adminPath: /wp-admin
|
||||||
|
log_js_errors: true
|
||||||
|
- WPDb:
|
||||||
|
dsn: 'mysql:host=mysql;dbname=wordpress'
|
||||||
|
user: wordpress
|
||||||
|
password: wordpress
|
||||||
|
dump: tests/_data/acceptanceGenerated.sql
|
||||||
|
populate: true
|
||||||
|
cleanup: false
|
||||||
|
url: 'http://wordpress'
|
||||||
|
urlReplacement: true
|
||||||
|
tablePrefix: 'mp_'
|
||||||
|
- WPCLI:
|
||||||
|
path: /wp-core
|
||||||
|
throw: true
|
Reference in New Issue
Block a user