Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting test sharding #1667

Open
jadenPete opened this issue Dec 9, 2024 · 0 comments
Open

Supporting test sharding #1667

jadenPete opened this issue Dec 9, 2024 · 0 comments

Comments

@jadenPete
Copy link

This issue is part of a broader proposal to merge some of the features in lucidsoftware/rules_scala into this ruleset.

The tracking issue for this effort

The relevant proposal section.

Bazel has a test sharding feature that test runners can choose to support. From the documentation on test sharding:

Tests can be parallelized via test sharding. See --test_sharding_strategy and shard_count to enable test sharding. When sharding is enabled, the test runner is launched once per shard. The environment variable TEST_TOTAL_SHARDS is the number of shards, and TEST_SHARD_INDEX is the shard index, beginning at 0. Runners use this information to select which tests to run - for example, using a round-robin strategy. Not all test runners support sharding.

Test sharding imposes a couple benefits:

  • It's an easy way to speed up large test targets
  • It's helpful in end-to-end testing, where each running test can spin up its own web browser

We rely on test sharding extensively at Lucid Software and would like to implement it in bazelbuild/rules_scala.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant