Exception Handling (e.g. throw new Error) stopped working in the steps
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js, playwright
- 領域
- testing
研究方向
使用 CodeceptJS 3.0.4 和 Playwright helper 重現提供的失敗步驟,然後與行為正常的 3.0.2 進行比較。追蹤步驟執行和例外處理路徑;當拋出的 Error 使步驟失敗並出現在測試輸出中時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
What are you trying to achieve?
I would like to see the error if step fails with exception
e.g.
Given('I fail the step', () => {
throw new Error('Error');
});
What do you get instead?
I can see that step passes
Provide console output if related. Use
--verbosemode for more details.
fail step @fail
✔ OK
Provide test source code if related
Example
My step in a feature file
@fail
Scenario: fail step
Given I fail the step
Implementation
Given('I fail the step', () => {
throw new Error('Error');
});
Result
fail step @fail
✔ OK
Details
- CodeceptJS version: 3.0.4
- (With version 3.0.2 everything works fine!)
- NodeJS Version: 12.19.2 (with 14.15.4 I have the same issue)
- Operating System: Windows/Mac/Debian
- playwrigth
- Configuration file:
exports.config = {
output: './output',
helpers: {
Playwright: {
browser: process.env.BROWSER || 'chromium',
windowSize: '1400x800',
waitForAction: 500,
waitForNavigation: 'load',
chromium: {
args: [
'--disable-setuid-sandbox',
'--deterministic-fetch',
'--no-sandbox',
],
},
waitForTimeout: 40000,
disableScreenshots: false,
uniqueScreenshotNames: true,
keepBrowserState: false,
keepCookies: true,
restart: false,
locale: 'en_US',
show: process.env.SHOW === 'true',
},
helpers etc.
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 756
- 平均合併
- 2 天 9 小時
- 30 天內合併 PR
- 16
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
-
stale
難度 4/5 3-5 天 新手友好度 38/100
codeceptjs/CodeceptJS#5618 · 1 則留言 ·
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
bot:ai-assisted component:compact-js status:untriaged
難度 2/5 1-3 小時 新手友好度 84/100
midnightntwrk/midnight-sdk#403 ·
-
難度 1/5 1 小時以內 新手友好度 92/100
-
難度 1/5 1-3 小時 新手友好度 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
難度 2/5 1-3 小時 新手友好度 90/100