Code Monkey home page Code Monkey logo

Comments (1)

ArturT avatar ArturT commented on June 12, 2024

Hi @caalberts

This can be used to run test files for classes or modules that have recently changed first.

How would you detect what tests should be run? Maybe by using some kind of code coverage tool?

Would some other tool provide the list of tests that should be run first or Gitlab already does that?

knapsack could take a list of tests in ENV and run it first.

Something like that would be already possible in knapsack_pro:

You could do it in 2 steps:

Step 1. Run c tests for classes or modules that have recently changed.

export KNAPSACK_PRO_TEST_FILE_LIST=spec/features/dashboard_spec.rb,spec/models/user.rb
export KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=token-for-priorities-tests
bundle exec rake knapsack_pro:queue:rspec

https://github.com/KnapsackPro/knapsack_pro-ruby#how-to-run-a-specific-list-of-test-files-or-only-some-tests-from-test-file

Step 2. Run all tests except tests executed in step 1.

export KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN="{spec/features/dashboard_spec.rb,spec/models/user.rb}"
export KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC=token-for-other-tests
bundle exec rake knapsack_pro:queue:rspec

https://github.com/KnapsackPro/knapsack_pro-ruby#how-to-exclude-tests-from-running-them

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.