pixielabs / cavy

An integration test framework for React Native.

Home Page:https://cavy.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filtering tests

cwilby opened this issue · comments

It would be helpful if we could filter tests as the number of tests in the project grows.

How much work would it be to implement something like a cli --filter argument which matches against root describe nodes and runs only those tests?

Hi @cwilby - I really like this idea! Perhaps something similar to RSpec where you can pass in a filename, or a folder of tests to run.

Unfortunately, we're pretty stacked here at Pixie Labs for the next month or so, so time for developing new features is limited. I'll add this to the product backlog though, so we can prioritise in the near future :)

Thanks for supporting Cavy!

@cwilby , @TaylorMichaelHall - hi guys!

We're currently working on fleshing out the roadmap for Cavy (soon to be made public) and filtering tests is on there 🙌

We're thinking of implementing a tagging system similar to rspec, whereby you could add a :focus tag to the test(/s) you wanted to run, and Cavy would run those tests only:
https://relishapp.com/rspec/rspec-core/v/2-12/docs/command-line/tag-option

I'd be happy to hear your thoughts on that approach, and whether you think that it would suit your use-cases.

Thanks!

I like the tagging approach, and I think it suits at least my own use-cases of being able to run individual tests and tag tests to include/exclude during runs.

Just hallway feedback that might be related - I type phpunit --filter=NameOfTestSuite|nameOfTest a lot to do filtering. It's a nice "flow" so to speak when doing tests at "runtime".

Thanks for adding this to the roadmap, Cavy team rocking it 👍

@AbigailMcP @cwilby I also noticed this, thanks for bringing it up. I use testcafe for web automation projects. They have a (.only) method to run specific test suits referred to as "fixtures" or individual test cases. I've provided a link to their documentation below.

https://devexpress.github.io/testcafe/documentation/reference/test-api/test/only.html

Hi everyone! Very happy to announce that Cavy 3.4.1 now includes the ability to tag and filter tests. Check out the docs here: https://cavy.app/docs/api/filtering-tests

Closing the issue, but also excited to hear how y'all get on with testing.

Thank you for helping make Cavy great with your feedback ❤️