I have been trying to skip the tests based on the environment. TestCafe doesn't have skipif
feature. which would be pretty easy to exclude tests if the env=qa. I tried using .filter
but it was not solving my problem. Please consider this as a feature request.
You can use a regular condition for this purpose; eg:
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 is not the best place for making feature requests. It is better to make them in the testcafe repository.
Reg the above Answer:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.