Comments (7)
@szeiger thanks!! that's been driving me crazy for almost a year now. So glad to finally know how to do it!
Should we update the README? It suggests that you should use --tests= but that doesn't seem to be the case?
[myplayproj] $ testOnly -- --tests=com.*
[info] Passed: Total 302, Failed 0, Errors 0, Passed 0, Skipped 302
[success] Total time: 4 s, completed Jan 8, 2014 11:39:54 AM
from junit-interface.
I'm getting Argument unrecognized by ScalaTest's Runner: *pattern
when invoking like:
sbt test-only -- *pattern
Also, passing a single -q
seems to effectively suppress a lot of output but when I do:
-q *pattern
I get this error:
Discovery suffixes (-q) is not supported when running ScalaTest from sbt; Please use sbt's test-only or test filter instead
Seems like scalatest is involved here somehow although my build.sbt doesn't mention it and only imports this junit-interface for testing.
from junit-interface.
i think we can close this bug in favor of sbt/sbt#911. support is scheduled in sbt for 0.13.2. once it's supported in sbt, i don't think we'll need to do anything here except to make sure we use the new test-interface. see https://github.com/szeiger/junit-interface/pull/32
from junit-interface.
junit-interface can already do this. If you give it a pattern for matching the tests to run, this is applied to the whole test name (as printed to the log), including method name and further qualifiers.
from junit-interface.
I can't figure out how to do this. Could you give an example or do you see what I'm doing wrong?
Here's how I tried to run it to run any tests starting with the package name "com"
[myplayproj] $ test -- --tests=com.*
[error] Expected ID character
[error] Not a valid command: test (similar: set, last, exit)
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[error] Expected key
[error] Expected '::'
[error] Expected end of input.
[error] test -- --tests=com.*
[error] ^
from junit-interface.
This should do the trick:
test-only -- com*
"test" doesn't pass any args to the test interface, you have to use "test-only"
from junit-interface.
from junit-interface.
Related Issues (20)
- Add JUnit4 version description corresponding to junit-interface 0.13.3 in READEME
- How to run all tests without certain tags?
- Tests annotated using @RunWith not picked up by sbt HOT 7
- running tests against exportJar never close the file handlers HOT 4
- Tests annotated in super class with RunWith are ignored
- Only one test is found / run HOT 2
- support opening and closing quotes in --tests HOT 2
- Doesn't support scala 2.11 HOT 1
- Junit 5 Compatibility HOT 14
- SBT 0.13.13 compatibility HOT 1
- Memory Leak in regard to TestClassLoader / Metaspace HOT 1
- JUnit Tests Ignored when Forking is Enabled
- Jenkins Pipeline Parallel test execution with SBT
- Does not report failures in cucumber scenario outline results HOT 4
- Compatibility with Spring 4.3 and above HOT 2
- support multiple junit --run-listener
- SBT 1.3. and junit-interface 0.11 not running JUnit tests HOT 1
- Publish a new release of junit-interface? HOT 11
- JUnit test failure is reported as success HOT 3
- can't run tests with same name multiple times HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from junit-interface.