saucelabs / saucectl

A command line interface for the Sauce Labs platform.
Apache License 2.0
42 stars 16 forks source link

feat: Tag aware sharding for cucumber-playwright #933

Closed mhan83 closed 2 months ago

mhan83 commented 2 months ago

Description

When using tags as part of a suite configured to shard, it's possible for saucectl to launch jobs with no tests to run. e.g. if the feature file contains no scenarios matching the given tag expression.

Instead, we can have saucectl parse the feature files and exclude any files that do not match the given tag expression.

Comments

The equivalent behaviour for a cypress suite is enabled with the shardGrepEnabled configuration. Using the same name here could be confusing since "grep" doesn't really map to what's happening. Went with shardTagEnabled which is sort of meh.

The other option is to just enable the behaviour if the user has any tags specified in the suite. Since we're using the official gherkin parser there should be more confidence that the filtering works as expected.

DEVX-2794