<commit_before><?php
// The environment constants below define where the testsuite is located in the runtime environment.
// Firefox should be able to access the files of the testsuite, to access the fixtures for instance.
define('SELENIUM_ROOT', Config::read('testsuite.path'));
define('SELENIUM_FIXTURES', SELENIUM_ROOT . DS . DATA . 'fixtures' . DS);
define('SELENIUM_IMG_FIXTURES', SELENIUM_FIXTURES . 'img');
define('SELENIUM_TMP', SELENIUM_ROOT . DS . 'tmp');

/**
 * Web Driver Test Case
 * The base class for test cases.
 *
 * @copyright (c) 2015-present Bolt Softwares Pvt Ltd
 * @licence GNU Affero General Public License http://www.gnu.org/licenses/agpl-3.0.en.html
 */
class WebDriverTestCase extends PHPUnit_Framework_TestCase {

    public $driver;             // @var RemoteWebDriver $driver
    protected $_browser;
    protected $_verbose;
    protected $_log;
    protected $_quit;
    protected $_failing;
	protected $_build;

	// Name of the current test.
	public $testName;

	protected $_saucelabs; // boolean

	// Saucelab job.
	protected $_sauceAPI;
	protected $_sauceLabJob;

    /********************************************************************************
     * Pre/Post Tests Execution Callback
     ********************************************************************************/
    /**
     * This function is executed before a test is run
     * It setup the capabilities and browser driver
     */
    protected function setUp() {
        $this->_failing = null;
	    $this->testName = $this->toString();

	    // Get Build ID.
	    // Set it if not provided.
	    $build = getenv('BUILD');
	    if (!$build) {
		    $build = time();
		    putenv('BUILD', $build);
	    }
	    $this->_build =$build;


	    $this->_saucelabs = Config::read('testserver.default') == 'saucelabs' ? true : false;

	    // Reserve instances for passbolt and selenium.
	    if ($this->__useMultiplePassboltInstances()) {
		    $this->reserveInstance('passbolt');
	    }
	    if ($this->__useMultipleSeleniumInstances()) {
		    $this->reserveInstance('selenium');
	    }

	    // Init browser.
		$this->initBrowser();

	    // Maximize window.
	    $this->driver->manage()->window()->maximize();

	    // SauceAPI.
	    if ($this->_saucelabs) {
		    $this->_sauceAPI = new Sauce\Sausage\SauceAPI(Config::read('testserver.saucelabs.username'), Config::read('testserver.saucelabs.key'));
		    $this->_sauceLabJob = $this->getSauceLabJob();<commit_msg>PASSBOLT-1666 Job name for saucelabs<commit_after><?php
// The environment constants below define where the testsuite is located in the runtime environment.
// Firefox should be able to access the files of the testsuite, to access the fixtures for instance.
define('SELENIUM_ROOT', Config::read('testsuite.path'));
define('SELENIUM_FIXTURES', SELENIUM_ROOT . DS . DATA . 'fixtures' . DS);
define('SELENIUM_IMG_FIXTURES', SELENIUM_FIXTURES . 'img');
define('SELENIUM_TMP', SELENIUM_ROOT . DS . 'tmp');

/**
 * Web Driver Test Case
 * The base class for test cases.
 *
 * @copyright (c) 2015-present Bolt Softwares Pvt Ltd
 * @licence GNU Affero General Public License http://www.gnu.org/licenses/agpl-3.0.en.html
 */
class WebDriverTestCase extends PHPUnit_Framework_TestCase {

    public $driver;             // @var RemoteWebDriver $driver
    protected $_browser;
    protected $_verbose;
    protected $_log;
    protected $_quit;
    protected $_failing;
	protected $_build;

	// Name of the current test.
	public $testName;

	protected $_saucelabs; // boolean

	// Saucelab job.
	protected $_sauceAPI;
	protected $_sauceLabJob;

    /********************************************************************************
     * Pre/Post Tests Execution Callback
     ********************************************************************************/
    /**
     * This function is executed before a test is run
     * It setup the capabilities and browser driver
     */
    protected function setUp() {
        $this->_failing = null;
	    $this->testName = $this->toString();

	    // Get Build ID.
	    // Set it if not provided.
	    $build = getenv('BUILD');
	    if (!$build) {
		    $build = time();
		    putenv("BUILD=$build");
	    }
	    $this->_build =$build;


	    $this->_saucelabs = Config::read('testserver.default') == 'saucelabs' ? true : false;

	    // Reserve instances for passbolt and selenium.
	    if ($this->__useMultiplePassboltInstances()) {
		    $this->reserveInstance('passbolt');
	    }
	    if ($this->__useMultipleSeleniumInstances()) {
		    $this->reserveInstance('selenium');
	    }

	    // Init browser.
		$this->initBrowser();

	    // Maximize window.
	    $this->driver->manage()->window()->maximize();

	    // SauceAPI.
	    if ($this->_saucelabs) {
		    $this->_sauceAPI = new Sauce\Sausage\SauceAPI(Config::read('testserver.saucelabs.username'), Config::read('testserver.saucelabs.key'));
		    $this->_sauceLabJob = $this->getSauceLabJob();
{'fraction_non_alphanumeric': 0.1906779661016949, 'fraction_numerical': 0.003228410008071025, 'mean_word_length': 3.4298480786416445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2950921', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1444, 'n_words': 372}