Git Product home page Git Product logo

Comments (7)

benmccann avatar benmccann commented on August 15, 2024 1

@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.

johanatan avatar johanatan commented on August 15, 2024 1

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.

benmccann avatar benmccann commented on August 15, 2024

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.

szeiger avatar szeiger commented on August 15, 2024

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.

benmccann avatar benmccann commented on August 15, 2024

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.

szeiger avatar szeiger commented on August 15, 2024

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.

eed3si9n avatar eed3si9n commented on August 15, 2024

#107

from junit-interface.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.