-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggest ] 建议 playwright的进程被ctrl +c 或者vscode 插件 关闭后,monocart-reporter仍输出报告 #117
Comments
试了一下,ctrl+c 杀进程,好像不行,官方的html报告也没有,你确定不是之前的html缓存? |
电脑不在身边,这个我明后天验证一下 |
中途ctrl+c后会提示Terminate batch job (Y/N)? ,我输入y继续中断
|
我也是测试之前删除html的文件夹,ctrl+c后并没有产生任何html的文件
不知道你用的什么playwright版本和操作系统,还有nodejs版本,还有用的什么终端,比如cmd(是否开启管理员模式)?不知道和这些有没有关系 |
好的,仓库准备好了跟你说下 终端为vscode底下的windows powershell终端(未开管理员模式) |
看起来好像真的可以,你这个仓库,我按ctrl+c就立即显示 |
然后,我增加了'monocart-reporter'好像也可以触发,只是稍微慢一点,要不你也试试? Running 3 tests using 1 worker
✘ 1 [debug] › test-1.spec.ts:3:5 › test0 (727ms)
终止批处理操作吗(Y/N)?
1 interrupted
[debug] › test-1.spec.ts:3:5 › test0 ───────────────────────────────────────────────────────────
2 did not run
[MR] generating report data ...
[MR] generating test report ...
[MR] My Report
┌─────────────┬────────────────────┐
│ Tests │ 3 │
│ ├ Passed │ 0 (0.0%) │
│ ├ Flaky │ 0 (0.0%) │
│ ├ Skipped │ 3 (100.0%) │
│ └ Failed │ 0 (0.0%) │
│ Steps │ 14 │
│ Suites │ 1 │
│ ├ Projects │ 1 │
│ ├ Files │ 1 │
│ ├ Describes │ 0 │
│ └ Shards │ 0 │
│ Retries │ 0 │
│ Errors │ 0 │
│ Logs │ 0 │
│ Attachments │ 2 │
│ Artifacts │ 0 │
│ Playwright │ v1.42.1 │
│ Date │ 2024/5/13 11:33:56 │
│ Duration │ 2.1s │
└─────────────┴────────────────────┘
[MR] html report: test-results/report.html (json: test-results/report.json)
[MR] view report: npx monocart show-report test-results/report.html
To open last HTML report run:
npx playwright show-report
y 而我自己的项目,好像无论是html还是monocart都没有触发报告
但目前来说,我还没有找到html里面有什么特别的代码来处理这个特殊情况,当然,html报告应该比monocart快,毕竟里面的功能和要处理的任务不同,也许你按得快,时间只够处理html的报告 |
在这个demo里面,我加了monocart-reporter,ctrl+c也能输出报告。而我自己的项目里面却无法输出报告,不清楚是不是项目里面增加了一些功能模块而触发了“ctrl+c中断无法输出报告”的问题。这个复现条件蛮奇怪的,我后面按照你的分析思路验证一下 |
嗯,谢谢,我也会继续研究一下,感觉还是执行时间限制的问题,如果工作量大,就来不及执行所有的任务 |
现状:
![image](https://private-user-images.githubusercontent.com/29114225/329470909-631be047-46ee-40e5-90b0-fb8d19683663.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5NjgxNzQsIm5iZiI6MTcxODk2Nzg3NCwicGF0aCI6Ii8yOTExNDIyNS8zMjk0NzA5MDktNjMxYmUwNDctNDZlZS00MGU1LTkwYjAtZmI4ZDE5NjgzNjYzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDExMDQzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdjNmE0NTk2MTQxYjlmMDEzODdjZTBkNDg2ZmM4ZmUxZWUyMjUxNmE5YTVlZTRiMGRhMTMxZTVkM2Q5NTBmYjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.E_sxCG03vk-b1IHwAGi5HpeBqwzjj8BbDDmYKntUva4)
使用微软的默认的html测试报告,当我将playwright的npx进程ctrl+c 杀掉(或者vscode 插件的中止按钮)后,仍然会出现测试报告;
使用monocart-reporter进行测试,如果ctrl+c 杀进程(或者vscode 插件的中止按钮),monocart-reporter不会生成报告
期望:
使用monocart-reporter进行测试,如果ctrl+c 杀进程(或者vscode 插件的中止按钮),monocart-reporter也生成报告。
因为就算是手工终断playwright,我也想看到前面运行过的test cases的报告详情
The text was updated successfully, but these errors were encountered: