foogile/nb-remote-phpunit
Composer 安装命令:
composer require foogile/nb-remote-phpunit
包简介
Execute PHPUnit tests over ssh using NetBeans
README 文档
README
Custom PHPUnit script that enables NetBeans to run tests on a remote host. Mainly developed to make Vagrant environments more convenient to work with, but it can easily be extended to communicate with other remote hosts.
Installation
The package should be installed using composer:
compose require foogile/nb-remote-phpunit
Subsequent sections desribe more specific installations.
Vagrant
Default Vagrant test scripts can be installed using the following commands:
vagrant ssh; cd /vagrant compose require foogile/nb-remote-phpunit
Other
See "Custom test runner".
Usage
Activate remote execution in NetBeans 8 as follows:
- Right click your project and click "Properties"
- Navigate to "Testing" > "PHPUnit"
- Check "Use Custom PHPUnit Script" and point "PHPUnit Script"
to
VAGRANT_PATH/vendor/foogile/nb-remote-phpunit/netbeans/phpunit-vagrant.php, whereVAGRANT_PATHis an absolute path to your vagrant folder. - Run tests as you would normally do
Custom test runner
You can run tests on custom remote hosts by implementing a custom remote host and providing a custom NetBeans PHPUnit script.
For example:
class SSHRemoteHost implements RemoteHostInterface { public public put($localPath, $remotePath) { exec("scp $src myhost.com:$dst"); } public function get($remotePath, $localpath) { exec("scp myhost.com:$remotePath $localPath"); } public function delete($remotePath) { exec("ssh myhost.com 'rm $remotePath'"); } public function exec($command) { exec("ssh myhost.com '$command'"); }
See netbeans/phpunit-vagrant.php for an example of a custom NetBeans
PHPUnit script.
Pull requests are welcome :)
Credits
Based on the blog post Running PHPUnit tests on a VM, from NetBeans.
foogile/nb-remote-phpunit 适用场景与选型建议
foogile/nb-remote-phpunit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 90 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 04 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「phpunit」 「remote」 「vagrant」 「netbeans」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 foogile/nb-remote-phpunit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 foogile/nb-remote-phpunit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 foogile/nb-remote-phpunit 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
HiDev plugin for PHPUnit
Allow packages to be installed from a repository or tarball bundle that have multiple packages in the sub-folders
Testing Suite For Lumen like Laravel does.
A cli tool which generates unit tests.
PHP library that allows linking queries from diferent physical databases using mysql pdo database connections
Vagrant(centos7) for web developers.
统计信息
- 总下载量: 90
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2015-04-19