2017 © Pedro Peláez
 

library menta

Selenium 2 Testing Framework (for PHPUnit)

image

aoemedia/menta

Selenium 2 Testing Framework (for PHPUnit)

  • Wednesday, January 6, 2016
  • by fbrnc
  • Repository
  • 61 Watchers
  • 16 Stars
  • 2,619 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Menta Documentation

Getting started

Setting up a test folder structure

Bootstrapping and Autoloading

Testcases

Configuration handling

default.xml vs. phpunit xml configuration, (*1)

Components

Organization of components

Project specific components Component library (plattform specific, agency specific) Rewrite mechanism to refine/override, (*2)

Rewrites

Translations using __()

Helpers

Menta_Component_Helper_Common

Menta_Component_Helper_Assert

Menta_Component_Helper_Wait

Menta_Component_Helper_Screenshot

Event/Observers

Configurations

Session management

Reuse browser sessions

Setting up the session

Screenshots

PHPUnit

Base classes

Selenium1 extends Selenium2 extends PHPUnit, (*3)

Running Tests

cd /var/www
git clone --recursive git@git.aoesupport.com: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

HTML Report

Integration in Jenkins

Text Result

Sauce Labs

Running on Sauce Labs

Reporting test results to Sauce Labs

/**
 * 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();
}

Alt text, (*4)

The Versions

06/01 2016

dev-master

9999999-dev https://github.com/AOEpeople/Menta

Selenium 2 Testing Framework (for PHPUnit)

  Sources   Download

Apache

The Requires

 

phpunit selenium webdriver browser

29/06 2015

dev-develop

dev-develop https://github.com/AOEpeople/Menta

Selenium 2 Testing Framework (for PHPUnit)

  Sources   Download

Apache

The Requires

 

phpunit selenium webdriver browser

08/04 2014

dev-feature/screenshot-processing

dev-feature/screenshot-processing https://github.com/AOEpeople/Menta

Selenium 2 Testing Framework (for PHPUnit)

  Sources   Download

Apache

The Requires

 

phpunit selenium webdriver browser