Sam*_*alg 5 concurrency automated-tests web-testing e2e-testing testcafe
我有一套测试,当没有并发运行时,所有测试都可以通过。当我开始并发运行它们时,它们开始崩溃。我不认为测试之间存在相互依赖关系,这会使它们失败。如果测试失败,则如下所示:
1) A JavaScript error occurred on
"https://advancedaccount.wistia.io/stats/medias/lz45f2dspl#social".
Repeat test actions in the browser and check the console for errors.
If you see this error, it means that the tested website caused it. You can fix it or disable tracking JavaScript errors in TestCafe. To do the latter, enable the
"--skip-js-errors" option.
If this error does not occur, please write a new issue at:
"https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
JavaScript error details:
undefined:
No stack trace available
Browser: Chrome 73.0.3683 / Linux 0.0.0
Screenshot: /mnt/artifacts/screenshots/Media - Social Stats/142_errors/1.png
497 | .expect(socialStatsPage.youtube.likes.textContent).contains('5')
498 | .expect(socialStatsPage.youtube.shares.textContent).contains('100')
499 | .expect(socialStatsPage.youtube.views.textContent).contains('20')
500 | .expect(socialStatsPage.cardError.withProps('vendorName',
'facebook').exists).ok()
501 | .expect(socialStatsPage.cardError.withProps('vendorName',
'facebook').textContent).contains('It looks like your credentials might be outdated')
> 502 | .click(socialStatsPage.reauthorizeAccountLink)
503 | .expect(getLocation()).contains('www.facebook.com');
504 | });
505 |
506 |test
507 | .requestHooks(mockFacebookExpired)('Non-account owner expired token', async (t)
=> {
at click (/usr/src/app/testcafe/tests/media/socialStats.js:502:8)
2) Unhandled promise rejection:
{ code: 'E1', isTestCafeError: true, callsite: CallsiteRecord { filename:
'/usr/src/app/testcafe/tests/media/socialStats.js', lineNum: 501, callsiteFrameIdx: 6,
stackFrames: [ [CallSite], [CallSite], [CallSite], [CallSite], [CallSite], [CallSite],
[CallSite], CallSite {}, [CallSite], [CallSite], [CallSite], [CallSite] ], isV8Frames: true
}, errStack: 'undefined:\n No stack trace available', pageDestUrl:
'https://advancedaccount.wistia.io/stats/medias/lz45f2dspl#social' }
Browser: Chrome 73.0.3683 / Linux 0.0.0
Run Code Online (Sandbox Code Playgroud)
好像发生这种情况时,许多其他并发浏览器(即使不是全部)也崩溃了,只是具有相同的Unhandled promise rejection故障诊断,而与测试完全无关。
我不知道从哪里开始调试。任何帮助都会很棒,因为我想让并发工作。这在我的Mac以及我们的CI设置中本地发生。
真正奇怪的是,当我查看测试失败的屏幕截图时,一切看起来都很好,所以我无法弄清楚为什么它首先失败了。就像我说的那样,如果没有并发标志,则此测试(以及所有其他测试)可以通过。
任何提示将不胜感激。我正在使用TestCafév1.2.1。
| 归档时间: |
|
| 查看次数: |
216 次 |
| 最近记录: |