agalmar/chromiuman
Composer 安装命令:
composer require agalmar/chromiuman
包简介
The Codeception extension for automatically starting and stopping Chromedriver when running tests.
README 文档
README
The Codeception extension for automatically starting and stopping Chromedriver when running tests.
Minimum Requirements
- Codeception 2.2.7
- PHP 5.4
Installation using Composer
$ composer require agalmar/chromiuman
Be sure to enable the extension in codeception.yml as shown in
configuration below.
Recommended Additional Packages
Chromedriver Installer via Composer
It is highly recommended that you use the Chromedriver
Installer package which will
install Chromedriver locally to your project in vendor/bin. Please follow the
installation
instructions
provided.
Chromiuman uses vendor/bin/chromedriver by default. If any other installation of
chromedriver is used, please set the path as shown in the configuration below.
Configuration
By default Chromiuman will use the path vendor/bin/chromedriver and port 9515.
Enabling and configuration can be done in codeception.yml or in your suite config file.
Enabling Chromedriver with defaults
extensions: enabled: - Codeception\Extension\Chromiuman
Enabling Chromiuman with alternate settings
extensions: enabled: - Codeception\Extension\Chromiuman config: Codeception\Extension\Chromiuman: path: '/usr/bin/chromedriver' port: 9515 suites: ['acceptance']
Enabling Chromiuman in the acceptance suite except on the ci environment
extensions: enabled: - Codeception\Extension\Chromiuman: suites: ['acceptance'] env: ci: extensions: enabled: - Codeception\Extension\Chromiuman: suites: []
Available options
Options set in the Chromiuman configuration are mapped to Chromedriver Options. The currently supported options are listed below.
path: {path}- Full path to the Chromedriver binary.
- Default:
vendor/bin/chromedriver
port: {port}- Webdriver port to start chromedriver with
- Default:
9515
adb_port: {port}- Adb server port
log_path: {FILE}- Write server log to file instead of stderr, increases log level to INFO
log_level: {LEVEL}- Set log level: ALL, DEBUG, INFO, WARNING, SEVERE, OFF
debug: {true|false}- Display debug output (log verbosely, equivalent to
log-level: {ALL}) while Chromedriver runs - Default:
false
- Display debug output (log verbosely, equivalent to
silent: {true|false}- Logs nothing (equivalent to
log-level: {OFF}) - Default:
false
- Logs nothing (equivalent to
append_log: {true|false}- Append log file instead of rewriting
- Default:
false
url_base: {base URL}- Base URL path prefix for commands, e.g. wd/url
- Default:
wd/url
replayable: {true|false}- (experimental) log verbosely and don't truncate long strings so that the log can be replayed
enable_chrome_logs: {true|false}- show logs from the browser (overrides other logging options)
allowed_ips: {CS-IP_List}- Comma-separated allowlist of remote IP addresses which are allowed to connect to ChromeDriver
allowed_origins: {CS-Request_Origin_List}- comma-separated allowlist of request origins which are allowed to connect to ChromeDriver. Using
*to allow any host origin is dangerous!
- comma-separated allowlist of request origins which are allowed to connect to ChromeDriver. Using
disable_dev_shm_usage: {true|false}- Do not use /dev/shm (add this switch if seeing errors related to shared memory)
- Default:
false
readable_timestamp: {true|false}- Adds readable timestamps to log
- Default:
false
suites: {array|string}- If omitted, Chromedriver is started for all suites
- Specify an array of suites or a single suite name
Usage
Once installed and enabled, running your tests with php codecept run will
automatically start the Chromedriver server and wait for it to be accessible before
proceeding with the tests.
Starting Chromedriver.
Waiting for Chromedriver to be reachable..
Chromedriver now accessible.
Once the tests are complete, Chromedriver will be shut down.
Stopping Chromedriver.
agalmar/chromiuman 适用场景与选型建议
agalmar/chromiuman 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.73k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 09 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「extension」 「codeception」 「headless」 「chrome」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 agalmar/chromiuman 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 agalmar/chromiuman 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 agalmar/chromiuman 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Connection 'Db' codeception module to 'Yii2' module database settings
Mailtrap module for Codeception
This extension provides integration with solr to output content from TYPO3 in JSON format.
A custom URL rule class for Yii 2 which allows to create translated URL rules
Instrument headless chrome/chromium instances from php5.6
The Yii2 extension uses jQuery jquery.carousel-1.1.min.js and makes image carousel from php array of structure defined.
统计信息
- 总下载量: 13.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-01