Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Long start up period in case of too many testcases

未关闭
#2,805 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞

调研方向

首先使用报告中提到的大型 feature 集,通过 yarn codeceptjs run --steps --verbose --grep=@debug 重现延迟。阅读 node_modules/codeceptjs/lib/mochaFactory.js 以及所引用的 mocha.loadFiles 路径,以确定启动时间消耗在哪里。对于许多测试文件,初始暂停时间得到显著减少,且不改变场景执行,即视为完成。

由索引模型根据 Issue 内容生成。

描述

What are you trying to achieve?

Pause between codeceptjs run command and first scenario steps execution should not spend seconds, tens of seconds

What do you get instead?

In the case with a lot of test files and scenarios into these files I see initial delay in ~40 seconds . Related with ~70 feature.ts files and ~400 scenarios.
Who knows, it can be related with initial reading of files with tests and can be related with node_modules/codeceptjs/lib/mochaFactory.js and mocha.loadFiles...
In case of project with small count of files and scenarios delay < 2-3 seconds.

Provide console output if related. Use --verbose mode for more details.

make test-e2e  GREP=@debug
yarn codeceptjs run --steps --verbose --grep=@debug
yarn run v1.22.10                                                                                                                                
$ XXX/node_modules/.bin/codeceptjs run --steps --verbose --grep=@debug                            
{
  startUrl: 'http://localhost:9000',
  tests: 'XXXX/**/*.feature.ts'
}
Details
  • CodeceptJS version: 2.6.11/3.0.4
  • NodeJS Version: v12.19.0
  • Operating System: MacOS 10.15.7
  • puppeteer
主要语言
JavaScript
星标
4.2k
派生
756
平均合并
2 天 9 小时
30 天内合并 PR
16

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codeceptjs/CodeceptJS 的其他 Issue

查看 codeceptjs/CodeceptJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。