I'm trying to find the best way of How to run TestCafe tool scripts using particular grouping - smoke, regression, etc.? What would be the proper syntax of cmd? WE have script with fixture and think to use it for grouping.All I need to find out the answer is it is possible and what would be the correct cmd for that. THanks for the reply, Alex

2

There are 2 best solutions below

2
On

Please use "fixture" to group test. To filter run fixtures, use the following options:

-F or --fixture-grep patern

-t or --test name

-f or --fixture name

2
On

In order to run a subset of Fixtures/Tests (i.e. 'Smoke'), you can now use the .meta({key: 'value', key2: 'value2'}) option for both the Fixture and the Test objects.

Example:

test
    .meta({smoke: true, feature: true})

or

fixture
    .meta('crud': 'read'})

Then, when running from the command line, pass --test-meta key=value or --fixture-meta key=value options now, as mentioned here

And again in the Enhancements documentation