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

-Dsuites option still runs all suites #54

Open
githorse opened this issue Jul 21, 2018 · 0 comments
Open

-Dsuites option still runs all suites #54

githorse opened this issue Jul 21, 2018 · 0 comments

Comments

@githorse
Copy link

When I run mvn test -Dsuites=com.example.FooSpec, all of my tests still run as before. In the logs, I can see that FooSpec does get instantiated first, but then I see "Discovery starting" and all the other specs still get instantiated and run:

$ mvn test -Dsuites=com.example.FooSpec

...

[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ example_2.11 ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- scalatest-maven-plugin:2.0.0:test (test) @ example_2.11 ---
[INFO] Forking ScalaTest via: /bin/sh -c cd '/path/to/example' && 'java' '-Dbasedir=/path/to/example' 'org.scalatest.tools.Runner' '-R' '/path/to/example/target/classes /path/to/target/test-classes' '-s' 'com.example.FooSpec' '-w' 'com.example' '-o' '-u' '/path/to/example/target/surefire-reports/.'
18/07/21 11:36:52 INFO FooSpec: initiating some stuff
Discovery starting.
18/07/21 11:36:54 INFO BarSpec: initiating some stuff 
18/07/21 11:36:54 INFO BazSpec: initiating some stuff 

...

Discovery completed in 26 seconds, 444 milliseconds.
Run starting. Expected test count is: 170
FooSpec:
Foo
  when stuff happens
  - should confidently announce that everything will be fine
BarSpec:
Bar
  when stuff happens
  - should exhibit an unruffled demeanor
BazSpec:
Baz
  when stuff happens
  - should stride purposefully over and deal with it

Not sure what I'm missing here. How can I run just the single test I want?

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