Skip to content

Klaster1/testcafe-repeat-test

Repository files navigation

Support Ukraine Badge Stand With Ukraine

TestCafe repeat test

A tool to ergonomically repeat a specific TestCafe test and skip other tests. Useful for debugging unstable tests.

Installation

npm i @klaster_1/testcafe-repeat-test

Usage notes

Test repeater only works if you use the globally available function and do not import it from TestCafe:

// Works
repeatTest(2)
test('Test', async t => {})
// Doesn't work
import {test} from 'testcafe'

repeatTest(2)
test('Test', async t => {})

Examples:

import repeatTest from '@klaster_1/testcafe-repeat-test';

fixture`Demo`

repeatTest(3)
test('Demo', async (t) => {
  console.log('Hello world')
})

// Log:
// Default
// √ Demo 1
// √ Demo 2
// √ Demo 3
import repeatTest from '@klaster_1/testcafe-repeat-test';

fixture`Demo`

repeatTest(2, {rename: false})
test('Demo', async (t) => {
  console.log('Hello world')
})

// Log:
// Default
// √ Demo
// √ Demo

About

A tool to ergonomically repeat TestCafe tests

Resources

License

Stars

Watchers

Forks

Packages

No packages published