Code Monkey home page Code Monkey logo

Comments (8)

ArturT avatar ArturT commented on May 31, 2024

@aabrook Thanks for the nice idea. I think randomize test ordering on each node sounds doable. Randomize them across nodes might be more problematic because we want to run specific tests on the particular node.

from knapsack.

aabrook avatar aabrook commented on May 31, 2024

I can definitely appreciate the difficulty across nodes just due to ensuring that execution times are uniform. Maybe a stretch goal where test balancing can be within a time frame to jumble. I suspect only possible in the pro version to track what's going on between nodes.

from knapsack.

ArturT avatar ArturT commented on May 31, 2024

Are you using the pro version https://github.com/KnapsackPro/knapsack_pro-ruby so you could try testing cross node randomization?

from knapsack.

aabrook avatar aabrook commented on May 31, 2024

Currently using just this version. Reviewed the pro but, due to the lack of https, we chose to continue with this version.

from knapsack.

ArturT avatar ArturT commented on May 31, 2024

I added https to pro version recently. Feel free to try it.

from knapsack.

ArturT avatar ArturT commented on May 31, 2024

@aabrook BTW currently you can randomize your rspec tests by adding in .rspec file the line

--order rand

Thanks to that you would have randomize tests per node. Rspec will randomize them no matter the order of given test files.

from knapsack.

ArturT avatar ArturT commented on May 31, 2024

Here is example how to pass argument to knapsack command:

$ bundle exec rake "knapsack:rspec[--order rand]"

another way is to set order in spec_helper.rb:

# spec/spec_helper.rb
RSpec.configure do |config|
  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = :random
end

from knapsack.

aabrook avatar aabrook commented on May 31, 2024

Great thank you

from knapsack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.