/** * Constructs a test case with the given name and browser to test execution * * @param string $name Test case name (by default = null) * @param array $data Test case data array (PHPUnit ONLY) (by default = array()) * @param string $dataName Name of Data set (PHPUnit ONLY) (by default = '') * @param array $browser Array of browser configuration settings: 'name', 'browser', 'host', 'port', 'timeout', * 'httpTimeout' (by default = array()) * * @throws InvalidArgumentException */ public function __construct($name = null, array $data = array(), $dataName = '', array $browser = array()) { $this->_testConfig = Mage_Selenium_TestConfiguration::initInstance(); $this->_dataHelper = $this->_testConfig->getDataHelper(); $this->_dataGenerator = $this->_testConfig->getDataGenerator(); $this->_applicationHelper = $this->_testConfig->getApplicationHelper(); $this->_pageHelper = $this->_testConfig->getPageHelper($this, $this->_applicationHelper); $this->_uimapHelper = $this->_testConfig->getUimapHelper(); if ($name !== null) { $this->name = $name; } $this->data = $data; $this->dataName = $dataName; $path = 'browsers/default/browserTimeoutPeriod'; $this->_browserTimeoutPeriod = !is_bool($this->_testConfig->getConfigValue($path)) ? $this->_testConfig->getConfigValue($path) : $this->_browserTimeoutPeriod; parent::__construct($name, $data, $dataName, $browser); }
* NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magentocommerce.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * * @category tests * @package selenium * @subpackage runner * @author Magento Core Team <*****@*****.**> * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ define('SELENIUM_TESTS_BASEDIR', realpath(dirname(__FILE__))); define('SELENIUM_TESTS_SCREENSHOTDIR', realpath(SELENIUM_TESTS_BASEDIR . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'screenshots')); set_include_path(implode(PATH_SEPARATOR, array(realpath(SELENIUM_TESTS_BASEDIR . DIRECTORY_SEPARATOR . 'lib'), realpath(SELENIUM_TESTS_BASEDIR . DIRECTORY_SEPARATOR . 'tests'), get_include_path()))); require_once 'Mage/Selenium/Autoloader.php'; Mage_Selenium_Autoloader::register(); require_once 'functions.php'; Mage_Selenium_TestConfiguration::initInstance();