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

[Question] How to run this with rspec? #118

Open
brett-anderson opened this issue Jul 9, 2024 · 1 comment
Open

[Question] How to run this with rspec? #118

brett-anderson opened this issue Jul 9, 2024 · 1 comment

Comments

@brett-anderson
Copy link

I am evaluating Buildkite as a replacement for our CI and I came across this repository. We currently use https://github.com/grosser/parallel_tests to split our rspec suite by runtime.

If we were to move to Buildkite, it would be nice to use the Test Analytics, as well as some sort of tool to partition the test suite.

Can you provide examples of how one would use this with an rspec test suite?

Thank you!

@wooly
Copy link
Contributor

wooly commented Jul 10, 2024

Hi @brett-anderson, thanks for reaching out!

We're currently working on some public documentation for integrating the test splitter into your pipeline, but for now I can describe here what this looks like (the documentation we do have is in-tool).

The steps would be as follows:

  1. Add the test splitter binary from the Github releases to your buildkite agents and make available in docker if you're containerizing your tests.
  2. Configure test-collector-ruby library to collect span data for your test suite. If you're looking at using Test Analytics, then you'd likely be doing this anyway.
  3. Configure your pipeline step to use the test splitter instead of directly calling RSpec. Something like the instructions here: https://github.com/buildkite/test-splitter?tab=readme-ov-file#run-the-test-splitter

There are a few differences between the Buildkite test splitter and Parallel Tests that might be worth calling out:

  1. Test Splitter doesn't use a parallel database approach, since the partitions will be running on different nodes with no access to a shared database. It's effectively running rspec with a subset of your tests, where the union of those subsets is the whole suite.
  2. Our plan is to support multiple test runners like Cypress and Jest in the future, so deep integration with runners is kept to a minimum and the test splitter serves as an orchestrator around the runner (in this case RSpec). This means no gems or packages to install.

We'd really appreciate some feedback on the setup process, so if you have a Buildkite account and want to have a crack at integrating the test splitter into your pipeline, let me know.

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

2 participants