Giter VIP home page Giter VIP logo

menta's Introduction

Menta Documentation

Getting started

Setting up a test folder structure

Bootstrapping and Autoloading

Testcases

Configuration handling

default.xml vs. phpunit xml configuration

Components

Organization of components

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

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

Running Tests

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

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

menta's People

Contributors

ajung avatar fbrnc avatar tmotyl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.