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

Tagging: --include-tags does not override the option set in sbt #562

Open
bphenriques opened this issue Jul 22, 2022 · 1 comment
Open

Comments

@bphenriques
Copy link

bphenriques commented Jul 22, 2022

Hello,

In my use-case I want to have two set of integration tests:

  1. Ones that I can run entirely locally. No tags set.
  2. Others that require connecting to a real testing environment. Tests tagged with uat-integration.

By default I want to skip tests in 2. but optionally override the sbt command to run those same tests. As in:

IntegrationTest / testOptions += Tests.Argument("--exclude-tags=uat-integration"), // also works albeit different from the docs

And then:

$ sbt "it:test -- --include-tags=uat-integration"

However, it seems that the parameter does not override the default option. Passing parameters to sbt is a bit finicky so I might be wrong as well.

My current workaround is to create a custom sbt task LocalIntegrationTest that excludes the tag (however I wanted to avoid that approach). I might be approaching munit incorrectly therefore I look forward for your feedback.

If the problem is not clear, I can setup a sample project with this scenario when I get the chance.

@bphenriques bphenriques changed the title --include-tags does not override the default option Tagging: --include-tags does not override the option set in sbt Jul 22, 2022
@bphenriques
Copy link
Author

I no longer have a need for this but leave the issue open as it documents unexpected behaviour as far as I can tell.

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

No branches or pull requests

1 participant