简体   繁体   English

testcafe 适用于单个测试,但所有测试

[英]testcafe works properly for individual test but all tests

I'm new in testcafe.我是 testcafe 的新手。 Here is the issue I confronted recently.这是我最近遇到的问题。 Please shine some light:请照亮:

Say I got four testcafe tests, say A, B, C and D假设我有四个 testcafe 测试,比如 A、B、C 和 D

  1. It works smoothly if I run them one by one, testcafe chrome A.js , testcafe chrome B.js and so on如果我一一运行它们, testcafe chrome A.jstestcafe chrome B.js等等,它会顺利运行

  2. Now I grab all my tests in a folder named tests then run it by using: testcafe chrome现在我把所有的测试放在一个名为 tests 的文件夹中,然后使用:testcafe chrome 运行它

After step2, only the first three tests work as desired(all pass), test D will always failed for suspending in the loading page, then Selector cannot locate the right button: step2之后,只有前三个测试如愿(全部通过),测试D总是挂在加载页面失败,然后Selector无法定位到右键:

loading page -- undesired加载页面——不需要

Here is the desired page which will showup in previous three tests:这是将在前三个测试中显示的所需页面:

desired page想要的页面

Can someone shining light on this issue?有人可以解决这个问题吗?

Just a follow-up, we have fixed the issue described in this thread:只是一个跟进,我们已经解决了这个线程中描述的问题:

Clear out the localStorage after testing测试后清空localStorage

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM