Closed gmile closed 6 years ago
So the current plan is to lean on ex unit to do that for you... Perhaps the readme could use some love but this is how it works today:
mix test path/to/feature.exs
or mix test --only integration
I guess we could add tasks that basically did the same thing if that would be helpful since I know running the exs
file isn't the most intuitive...
The #34 PR will give the ability to do the following:
Feature: Run just one test
@any-made-up-tag-you-want
Scenario: Targeting specific tests
Given there is a test I wish to run
When I execute "mix test --only any-made-up-tag-you-want"
Then only this test is run
Scenario: Another test
Given this a test that should not run
When I execute "mix test --only any-made-up-tag-you-want"
Then this test does not run
Also, given that the exs
version of that feature file is in test/tag_test.exs
, you could run each specific test like:
First scenario
mix test test/tag_test.exs:3
Second scenario
mix test test/tag_test.exs:8
Lastly it will allow a timeout value to be set in ExUnit by doing
Feature: Run just one test
# Has double the standard test timeout of 60 seconds
@timeout 120000
Scenario: Targeting specific tests
Given there is a test I wish to run
When I execute "mix test --only any-made-up-tag-you-want"
Then only this test is run
Is it possible to get mix test
running all the tests, including the cabbage tests?
Yes, currently works like that.
mix test
<- runs all tests.
If you want to run only cabbage tests, set global tag for all cabbage tests via config.
config :cabbage,
# Default is []
global_tags: :cabbage
`mix test --only=cabbage` <- will only run cabbage tests
I think it'd be great to have a
cabbage
mix task to tasks, tailored to features.mix cabbage run
Particularly it'd be great to be able to run only features, optionally pointing to specific features:
Like this:
mix cabbage features
Would display currently developed features.