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

Run Selected/Failed Tests or combine Tests which doesn't fall under a pattern

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
领域
cli, testing-qa

调研方向

首先跟踪针对提议的 --rerun-test 选项对 run 和 run-workers 命令的处理,然后检查 failedCases.json 将如何被创建、读取、更新、验证和删除。完成标准是能够重新运行选定的文件或失败的文件,报告无效或缺失的条目,支持来自不同文件夹的文件,并在最终执行成功时清空该文件。

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

描述

What are you trying to achieve?

Adding new option to run and run-workers to rerun the failed tests or the selected tests. Option added in --rerun-tests.

Working Nature :

  • When the run is initiated and when script(s) fail, the test script will be added in failedCases.json file.
  • When the rerun is initiated with the run --rerun-test or run-workers 2 --rerun-test command, test files will be picked from the json file instead of the config file.
  • Failed Tests will be updated from the last execution regardless of the mode it ran(either run or run --rerun-tests)
  • When all the tests are passed in the last execution, failesCases.json file be deleted from the project folder.
  • We can add files from different folders, files which doesn't falls under a single pattern etc.
  • When a invalid files or files are provided in the json file, message will be thrown with the invalid file.
  • When there is no failedCases.json file or no tests in the failedCases.json file and the run is initiated, appropriate message will be displayed to the user.

Benefits :

  • If the failed scripts need to run against different environments, it could be accomplished with this approach.
  • You can create failedCases.json manually and run the specific scripts you want to execute using the above commands.
  • This would be much useful, if you want to run the scripts which doesn't come under a pattern and from test files from different folders.

Console Outputs :

Failed Scripts when run-workers

1  Worker Failed Scripts

Failed Worker Script In Failed Cases

2 Failed Worker Script In Failed Cases JSON

Rerun Of the Failed Script

3 Rerun Of the Failed Script

Failed Cases JSON removed after the Failed Script succeeded

4 Failed Cases JSON removed after the Failed Script succeeded

Retries Captured In Allure

5 Retries Captured In Allure

Invalid Files Identification

Invalid Files Identification

Running Files From Two Different Folder

Running Files From Two Different Folder

主要语言
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 摘要。