Cannot grab browser logs on failure with multiple workers - question
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, nodejs
- 领域
- testing-qa
调研方向
从 run-workers 命令、event.test.failed hook 以及 issue 中链接的自定义并行执行文档开始。比较使用 run-workers 与 run 时浏览器访问和失败事件的行为,然后验证在使用多个 worker 时,测试失败后是否可以捕获浏览器日志。
由索引模型根据 Issue 内容生成。
描述
What are you trying to achieve?
I want to grab browser logs when some test failed, tests are run using command: ./node_modules/.bin/codeceptjs run-workers 2 --grep "@sometesttag" --plugins allure
And I see that custom hook:
event.dispatcher.on(event.test.failed, async (test, error) => {
})
inside which I use await I.grabBrowserLogs(); is not working when we use multiple workers. (when we use run-workers command, with run this code works OK)
Tried also surround some part of the code with try / catch block and call await I.grabBrowserLogs(); on error, but it does not work either.
Is this possible to make it working, simply to grab logs from browser on test failure (i.e. some element is not clickable on the page, or it is not in DOM), when we are using multiple workers? FYI - with standard run command I am using custom hook and it works like a charm. And I would like to achieve something similar but when multiple workers are used. Is this possible? I believe it might be doable using https://codecept.io/parallel/#custom-parallel-execution but then, I assume that browser control must be customized as well, and then we simply won't be able to use built-in method on I actor, right?
Details
- CodeceptJS version:
3.0.5 - NodeJS Version:
12.20.2 - Operating System: macOS Catalina
- puppeteer
- 主要语言
- 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
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id 未关闭bug
难度 2/5 1-3 小时 新手友好度 75/100
nightscout/nocturne#1414 ·
-
bug v2
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 条评论 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
难度 2/5 1-3 小时 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·