aoemedia/menta 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aoemedia/menta

Composer 安装命令:

composer require aoemedia/menta

包简介

Selenium 2 Testing Framework (for PHPUnit)

README 文档

README

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 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

统计信息

  • 总下载量: 2.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 16
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 16
  • Watchers: 41
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: Apache
  • 更新时间: 2012-11-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固