Example of splitting by test name for rspec rails

Does anyone here have an example app using --split-by=timings --timings-type=name successfully with Rspec/Rails in a parallelized (20 - 30 containers) set up? I can’t seem to get this to work.

My current command is

circleci tests glob "spec/**/*_spec.rb" | \ circleci tests run --command="xargs bundle exec rspec --profile 10 --format progress --format RspecJunitFormatter --backtrace -o tmp/test-results/rspec/rspec--$CIRCLE_NODE_INDEX.xml" --verbose --split-by=timings --timings-type=name

I can’t find a working example of this anywhere on the web. TIA!

@florence023 this is a useless garbage AI response, I have very little belief that you’re actually a human.

  1. I already checked that timing data is available and it is.
  2. “Command Adjustment” are you joking? You just removed a carriage return, otherwise your command is exactly the same.
  3. Ensure parallelism is working correctly? That has nothing to do with this problem. Parallelism of 2 would be fine in an actually working example. The parallelism key is incredibly simple to set up.

Please don’t waste people’s time posting AI-generated responses to this forum. What do you even have to gain from this?

@circleci-community you should probably know your forum has been infiltrated by AI response bots :slight_smile: . Sadly nobody from CircleCI has ever been able to provide me a working example of this even after a month and a half+ of back and forth, so I just am using Knapsack Pro instead. Sad that the docs even say this is possible when it clearly isn’t :confused: .

Sorry for the tone for any humans that read this, this AI response has just brought up my frustration with this problem all over again.

@zmf-framework sorry about that, i deleted the other post that appears to be spam. Can you send a link to a job where youre seeing the issue to sebastian@circleci.com. The command that you shared looks correct, I want to see what might be going on.

@sebastian-lerner I already have, I have an open support request where the person helping me basically admitted that you all have no working examples of this and nobody on your engineering team apparently could figure this out (even given 6+ weeks to). Sorry if that’s harsh, just trying to share the truth of what’s happened so far.

My work email is zmf (at) frame.work if you’d like to look up the cases.

Again, as I asked on this thread, all I’d like to see is one working example of a Rails/Rspec app splitting by test case.

Appreciate you trying to help though!

Got it, I’ll try to track that ticket down. Super strange because I’ve seen plenty of folks do just fine with the syntax from here Rerun failed tests - CircleCI

I guess maybe I’ve only ever looked for splitting by timing, but I would assume that if it works for timing, it would work for filename.

@sebastian-lerner these docs are for re-rerunning failed tests. I’m asking about running Rails Rspec test suites across multiple runners, but by test timing. Not class timing or file timing.

This way if files have a large # of tests, it doesn’t matter to the timing of the test suite :).

Sorry, I should have been more precise. The circleci tests run command works for both test splitting & rerunning failed tests, that’s why I was referencing it.

1 Like

Ah no problem, I get you!