[英]How can we skip the .after steps in TestCafe if the test itself fails?
[英]skip test based on the environment testcafe
我一直在尝试根据环境跳过测试。 TestCafe 没有skipif
功能。 如果 env=qa,这将很容易排除测试。 我尝试使用.filter
但它没有解决我的问题。 请将此视为功能请求。
为此,您可以使用常规条件; 例如:
import { Selector } from 'testcafe';
fixture `My fixture`
.page `http://devexpress.github.io/testcafe/example/`;
if (process.env.QA_MODE) {
test('QA_MODE_ON', async t => {
await t.wait(500);
});
}
else {
test('QA_MODE_OFF', async t => {
await t.wait(5000);
});
}
PS StackOverflow 不是提出功能请求的最佳场所。 最好将它们放在 testcafe 存储库中。
注册上面的答案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.