webproject-xyz/codeception-multi-module-test-runner 问题修复 & 功能扩展

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

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

webproject-xyz/codeception-multi-module-test-runner

Composer 安装命令:

composer require webproject-xyz/codeception-multi-module-test-runner

包简介

Run codeception in multiple modes in mvc structure

README 文档

README

➜ ./module-runner
webproject-xyz/codeception-multi-module-test-runner 1.0.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help                        Displays help for a command
  list                        Lists commands
 codeception
  codeception:modules:detect  List modules in mvc structure
  codeception:modules:init    Bootstrap Codeception in every module and add sample tests
  codeception:modules:run     Run single module


Example outputs

detect, no filter
➜ ./module-runner codeception:modules:detect -p tests/_data/app -e Application

Detect modules:
===============

Scan Module directory
---------------------

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------- ----------------- ------------------ 
  ModuleName    Has Codeception   Has Bootstrapped  
 ------------- ----------------- ------------------ 
  admin         ok                ok                
  application   NO!               NO!               
  core          ok                ok                
  error         ok                ok                
  no-codecept   NO!               NO!               
  skip          NO!               NO!               
 ------------- ----------------- ------------------ 

detect, filter "application" and "skip"
➜ ./module-runner codeception:modules:detect -p tests/_data/app -e Application -e skip

Detect modules:
===============

Scan Module directory
---------------------

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------- ----------------- ------------------ 
  ModuleName    Has Codeception   Has Bootstrapped  
 ------------- ----------------- ------------------ 
  admin         ok                ok                
  application   NO!               NO!               
  core          ok                ok                
  error         ok                ok                
  no-codecept   NO!               NO!               
 ------------- ----------------- ------------------ 

init command:

➜ ./module-runner codeception:modules:init -h                        
Description:
  Bootstrap Codeception in every module and add sample tests

Usage:
  codeception:modules:init [options] [--] [<moduleNames>...]

Arguments:
  moduleNames                                                      List of module names to run. default: all

Options:
  -f, --force[=FORCE]                                              Force bootstrap without codeception.yml [default: false]
  -p, --path=PATH                                                  path to app
  -e, --exclude[=EXCLUDE]                                          module names to skip (multiple values allowed)
  -s, --hide-progress[=HIDE-PROGRESS]                              hide output of progress bar [default: false]
  -h, --help                                                       Display this help message
  -q, --quiet                                                      Do not output any message
  -V, --version                                                    Display this application version
      --ansi                                                       Force ANSI output
      --no-ansi                                                    Disable ANSI output
  -n, --no-interaction                                             Do not ask any interactive question
  -so, --showCodeceptionOutput[=SHOWCODECEPTIONOUTPUT]             Show codeception console output [default: false]
  -sor, --showCodeceptionErrorOutput[=SHOWCODECEPTIONERROROUTPUT]  Show codeception console output only for failed modules [default: false]
  -v|vv|vvv, --verbose                                             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
init: example
➜ ./module-runner codeception:modules:init -p tests/_data/app

Bootstrap Codeception in modules:
=================================

Scan Module directory
---------------------

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 No module name given. Select one or run all? [Run all]:
  [0] Select one
  [1] Run all
 > 0

 Select module to run:
  [0] admin
  [1] application
  [2] core
  [3] error
  [4] no-codecept
  [5] skip
 > 5

Bootstrapping modules:
----------------------

 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------ -------- -------------------- 
  Name         Result   Message             
 ------------ -------- -------------------- 
  Skip         ok       Bootstrap finished  
 ------------ -------- -------------------- 

init: run command for specific module name "skip" (missing codeception.yml in "skip" module)
➜ ./module-runner codeception:modules:init -p tests/_data/app skip

Bootstrap Codeception in modules:
=================================

Scan Module directory
---------------------

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

Bootstrapping modules:
----------------------

 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------ -------- --------------------------------- 
  Name         Result   Message                          
 ------------ -------- --------------------------------- 
  Skip         error!   Missing codeception.yml in skip  
 ------------ -------- --------------------------------- 

➜ ./module-runner codeception:modules:init -p tests/_data/app skip -f

Bootstrap Codeception in modules:
=================================

Scan Module directory
---------------------

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

Bootstrapping modules:
----------------------

 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------ -------- -------------------- 
  Name         Result   Message             
 ------------ -------- -------------------- 
  Skip         ok       Bootstrap finished  
 ------------ -------- -------------------- 

➜ ./module-runner codeception:modules:run -p tests/_data/app -e application -e skip

multi-module-codeception-test-runner on  master [!+?] via 🐘 v7.3.5 on 🐳 v18.09.1 
➜ ./module-runner codeception:modules:run -p tests/_data/app -e application -e skip

Run Codeception for modules:
============================

Scan Module directory
---------------------

 8/8 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 No module name given. Select one or run all? [Run all]:
  [0] Select one
  [1] Run all
 > 1

Executing modules:
------------------

 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 
  ModuleName    Tests   Assertions   Errors   Failures   Time    Memory     Result  
 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 
  Error         1       0            1        0          75 ms   10.00 MB   error!  
  Core          1       4            0        0          74 ms   10.00 MB   ok      
  Admin         2       2            0        2          76 ms   10.00 MB   error!  
  No-codecept   0       0            0        0                             error!  
 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 

multi-module-codeception-test-runner on  master [!+?] via 🐘 v7.3.5 on 🐳 v18.09.1 took 8s 
 
Run single module "core"
multi-module-codeception-test-runner on  master [!+?] via 🐘 v7.3.5 on 🐳 v18.09.1 
➜ ./module-runner codeception:modules:run core -p tests/_data/app

Run Codeception for modules:
============================

Scan Module directory
---------------------

 8/8 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

Executing modules:
------------------

 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------------ ------- ------------ -------- ---------- ------- ---------- -------- 
  ModuleName   Tests   Assertions   Errors   Failures   Time    Memory     Result  
 ------------ ------- ------------ -------- ---------- ------- ---------- -------- 
  Core         1       4            0        0          74 ms   10.00 MB   ok      
 ------------ ------- ------------ -------- ---------- ------- ---------- -------- 
Run all no progress bars
➜ ./module-runner codeception:modules:run --hide-progress -p tests/_data/app  

Run Codeception for modules:
============================

Scan Module directory
---------------------

 No module name given. Select one or run all? [Run all]:
  [0] Select one
  [1] Run all
 > 

Executing modules:
------------------

 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 
  ModuleName    Tests   Assertions   Errors   Failures   Time    Memory     Result  
 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 
  Error         1       0            1        0          83 ms   10.00 MB   error!  
  Skip          0       0            0        0                             error!  
  Core          1       4            0        0          74 ms   10.00 MB   ok      
  Admin         2       2            0        2          75 ms   10.00 MB   error!  
  Application   0       0            0        0                             error!  
  No-codecept   0       0            0        0                             error!  
 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 

non interactive, all modules, no progress

./module-runner codeception:modules:run -s -p tests/_data/app -n

➜ ./module-runner codeception:modules:run -s -p tests/_data/app -n 

Run Codeception for modules:
============================

Scan Module directory
---------------------

Executing modules:
------------------

 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 
  ModuleName    Tests   Assertions   Errors   Failures   Time    Memory     Result  
 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 
  Error         1       0            1        0          74 ms   10.00 MB   error!  
  Skip          0       0            0        0                             error!  
  Core          1       4            0        0          73 ms   10.00 MB   ok      
  Admin         2       2            0        2          74 ms   10.00 MB   error!  
  Application   0       0            0        0                             error!  
  No-codecept   0       0            0        0                             error!  
 ------------- ------- ------------ -------- ---------- ------- ---------- -------- 


webproject-xyz/codeception-multi-module-test-runner 适用场景与选型建议

webproject-xyz/codeception-multi-module-test-runner 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.97k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 06 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cli」 「codeception」 「test-runner」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 webproject-xyz/codeception-multi-module-test-runner 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 webproject-xyz/codeception-multi-module-test-runner 我们能提供哪些服务?
定制开发 / 二次开发

基于 webproject-xyz/codeception-multi-module-test-runner 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-28