After hook is NOT working and browser does NOT close when more than 1 Feature sections exists in test file
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 冷清
- 技術堆疊
- javascript, node.js
- 領域
- testing
研究方向
從與 tests/*_tests.ts 相符的測試以及所示的 CodeceptJS 設定開始,重點關注多個 Feature 區段、restart: true 和 Puppeteer helper 之間的互動。使用多個 Feature 區段重現問題,並追蹤 After 和 AfterSuite 是否執行。完成的標準是 hooks 能夠執行,且每次測試後瀏覽器頁面都會關閉,不會累積處理程序。
由索引模型根據 Issue 內容生成。
描述
What are you trying to achieve?
When there are more than 1 Feature sections in the test file:
- the browser/page does NOT close after each test, so at the end I have many browsers opened, which slowing down my system.
- the
AfterandAfterSuitehooks are NOT working at all (are NOT called).
Tests behave (passed/failed) normally and the next test is conducted on newly opened browser, but After and AfterSuite hooks are NOT even called after test(s). Additional hooks / teardown implemented in the codecept.conf do NOT help. Any suggestion?
What do you get instead?
Tests behave (passed/failed) normally and the next test is conducted on newly opened browser, but After and AfterSuite hooks are NOT even called after test(s). Additional hooks / teardown implemented in the codecept.conf do NOT help, so at the end I have many browsers/threads opened, which slowing down my system.
Details
- CodeceptJS version: 3.6.10
- NodeJS Version: 20.15.0
- Operating System: Win11 Pro
- puppeteer version: 23.11.1
- Configuration file:
/// <reference types='./steps' />
import { testConfig } from "./testConfig";
const fullScreen: string = "false";
export const config: CodeceptJS.MainConfig = {
tests: "./tests/*_tests.ts",
timeout: 60,
output: "./output",
helpers: {
REST: {},
Puppeteer: {
url: testUrl,
browser: "chrome",
show: true,
fullPageScreenshots: true,
uniqueScreenshotNames: false,
waitForNavigation: ["load", "domcontentloaded"] as any,
pressKeyDelay: 7,
waitForTimeout: 30000,
restart: true,
windowSize: screenResolution.join("x") as any,
chrome: {
args: ["--no-sandbox", `--lang=${lang}`, fullScreen === "true" ? "--start-fullscreen" : ""],
},
},
CustomHelper: {
require: "./helpers/customHelper.ts",
},
AssertWrapper: {
require: "codeceptjs-assert",
},
ResembleHelper: {
require: "codeceptjs-resemblehelper",
screenshotFolder: "./output/",
baseFolder: "./screenshots/base/",
diffFolder: "./screenshots/diff/",
prepareBaseImage: false,
tolerance: 2,
needsSameDimension: true,
},
},
};
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 756
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 19
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 68/100
codeceptjs/CodeceptJS#5725 ·
維護者通常 1 天內回覆
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
TheOdinProject/curriculum#31444 ·
維護者通常 1 天內回覆
-
software-development-practices software-development-practices:nist-ssdf
難度 2/5 1-3 小時 新手友好度 82/100
githubnext/gh-aw-cao#15860 ·
維護者通常 1 天內回覆
-
framework/gatsby help wanted kind/bug
難度 2/5 1-3 小時 新手友好度 87/100
維護者通常 2 天內回覆
-
bug
難度 1/5 1 小時以內 新手友好度 92/100
PedestrianDynamics/pyFDS-Evac#476 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
aiko-chan-ai/DiscordBotClient#380 ·