E2E并行测试失败了2个或多个窗口打开

发布于 2025-01-20 09:44:43 字数 417 浏览 3 评论 0 原文

我在工作中有一个 Angular-TypeScript 程序,最近我使用 testcafe 进行并行 e2e 测试。问题是,当我配置 -c 3 进行并发测试时,测试总是在项目创建时失败。 不要过多关注细节。我基本上让它测试:创建项目->在该特定项目下运行的一些其他测试并移至下一个项目创建。

我通常会收到这两个错误 403 Tokenization failed ,而对于在项目下运行的测试,我会收到 401 unauthorized 。我尝试使用互斥体修复 403,如下所示的伪代码

if(token exists) 
  continue
else
  create new token

,但它没有解决并行测试问题。你们有什么想法或提示给我吗?提前致谢。

I have an angular-typescript program at work where I use testcafe for parallel e2e tests lately. The problem is, when I configure -c 3 for concurrency tests, the tests always fail at project creation.
To not get too much into details. I basically let it test: Create Project -> Some other tests running under that specific project and move to the next project creation.

I usually get these two errors 403 Tokenization failed and the for the tests running under the project I get 401 unauthorized. I tried to fix the 403 with a mutex like this pseudo code below

if(token exists) 
  continue
else
  create new token

But it did not fix the parallel test problem. Do you guys have any idea or hint for me? Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

少女七分熟 2025-01-27 09:44:43

没有显示该问题的示例项目,我无法再现这个问题。请使用以下模板在testcafe存储库中分享您的详细示例: https://testcafe.io/402636/faq#how-to-to-to-to-to-create-cereate-a-minimal-working-working-workample-when-when-when-when-when-you-submit-mit-submit-and-an-sissue

I can't reproduce the issue without an example project that shows it. Please share your detailed example in the testcafe repository using the following template: https://github.com/DevExpress/testcafe/issues/new?assignees=&labels=TYPE%3A+bug&template=bug_report.yaml. You can use the following instruction to create a minimal working example: https://testcafe.io/402636/faq#how-to-create-a-minimal-working-example-when-you-submit-an-issue

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文