Fixture.only Method

Marks a specific fixture for exection.

fixture.only → this

Use the test.only method to mark a specific test for execution.

When you mark multiple tests and/or fixtures with the only method, TestCafe runs all the tests and/or fixtures with the mark.

fixture.only `Fixture 1`; // TestCafe runs both tests in this fixture
test('Fixture 1 - Test 1', () => {});
test('Fixture 1 - Test 2', () => {});

fixture `Fixture 2`;

test('Fixture 2 - Test 1', () => {}); // TestCafe skips this test
test.only('Fixture 2 - Test 2', () => {}); // TestCafe runs this test
test('Fixture 2 - Test 3', () => {}); // TestCafe skips this test