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

Ignore some test #73

Open
eddbrown opened this issue Jan 9, 2018 · 7 comments
Open

Ignore some test #73

eddbrown opened this issue Jan 9, 2018 · 7 comments
Labels

Comments

@eddbrown
Copy link

eddbrown commented Jan 9, 2018

Hey there!

You can selectively run some tests by specifying their directory, but is there a way to deselect some tests and keep the others?

Thanks!

@ArturT
Copy link
Member

ArturT commented Jan 9, 2018

You can pass arguments to test runner the same way as you do it right now by using just test runner alone.

https://github.com/ArturT/knapsack#passing-arguments-to-rake-task

For instance, you can use RSpec tags and tell the RSpec to skip some of them:

bundle exec rake "knapsack:rspec[--tag ~skipTagName]"

What problem do you want to solve?


NOTE: this issue is related to KnapsackPro/knapsack_pro-ruby#57

@egze
Copy link

egze commented Sep 13, 2018

I have a similar feature request.

My use case is this. We have the following structure:

spec
├── acceptance
├── controllers
├── decorators
├── features

Acceptance folder has capybara specs with Chrome and requires a certain setup and is run in a separate pipeline and docker container. All the other specs are splitted with knapsack and run in parallel.

We want to exclude acceptance folder completely, but can't do it with just a KNAPSACK_TEST_FILE_PATTERN because internally knapsack does Dir.glob and there is no good way to exclude stuff. What also doesn't work is passing --exclude-pattern argument to knapsack:rspec["--exclude-pattern 'acceptance'"].

What would be nice is a KNAPSACK_TEST_FILE_EXLUDE_PATTERN that is used after Dir.glob.

@ArturT
Copy link
Member

ArturT commented Nov 7, 2018

@robertwe
Copy link

@ArturT what with the support for path exclusion in free version of the Knapsack?

@ArturT
Copy link
Member

ArturT commented Jan 26, 2022

Hi @robertwe

We are focused on improving the knapsack_pro gem. Support from our users is the way to ensure we provide maintenance of the project in the long run. knapsack_pro gem offers superior functionality, here are some examples for excluding patterns:

There is also a free plan for knapsack_pro gem if you'd like to try it.

@ArturT ArturT added the feature label Oct 28, 2022
@qileilove
Copy link

is anything updated on this topic?

@ArturT
Copy link
Member

ArturT commented Nov 8, 2022

@qileilove Could you share more about your project and what kind of tests you need to ignore? Feel free to email me at support https://knapsackpro.com/contact if you don't want to share it publicly.

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

No branches or pull requests

5 participants