default.xml vs. phpunit xml configuration
Project specific components Component library (plattform specific, agency specific) Rewrite mechanism to refine/override
Selenium1 extends Selenium2 extends PHPUnit
cd /var/www
git clone --recursive [email protected]:users/fabrizio.branca/TestSkeleton.git
cd /var/www/TestSkeleton
./composer.phar install
cd /var/www/TestSkeleton/Tests
mkdir -p ../../build/reports
# Run single test
../vendor/bin/phpunit -c ../conf/devfb.ff.vmhost.xml General/ScreenshotsTest.php
# Run all tests
../vendor/bin/phpunit -c ../conf/devfb.ff.vmhost.xml ../vendor/aoemedia/menta/lib/Menta/Util/CreateTestSuite.php
# Report will be in /var/www/build/reports
/**
* Will send the test result to sauce labs in case we're running tests there
*
* @return void
*/
protected function tearDown() {
$sauceUserId = $this->getConfiguration()->getValue('testing.sauce.userId');
$sauceAccessKey = $this->getConfiguration()->getValue('testing.sauce.accessKey');
if (!empty($sauceUserId) && !empty($sauceAccessKey) && Menta_SessionManager::activeSessionExists()) {
$status = $this->getStatus();
$passed = !($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR || $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE);
$rest = new WebDriver\SauceLabs\SauceRest($sauceUserId, $sauceAccessKey);
$rest->updateJob(Menta_SessionManager::getSessionId(), array(WebDriver\SauceLabs\Capability::PASSED => $passed));
}
parent::tearDown();
}