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 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #2809 來自 @ArpanRatanghayra —— 已關閉,未合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
javascript, node.js
領域
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
分支
755
平均合併
1 天 8 小時
30 天內合併 PR
18

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codeceptjs/CodeceptJS 的其他 Issue

查看 codeceptjs/CodeceptJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。