简体   繁体   中英

How to get the list of all test?

In sbt when I type testOnly and after press the tab key, then I will get all available tests:

sbt:plugger> testOnly 
--                                       com.sweetsoft.detector.DetectorSpec      com.sweetsoft.sender.SenderMessageSpec  

Is there a command to get all available test, instead press the tab key?

Try executing show test:definedTests from sbt, which on my machine outputs

sbt:scala-213> show test:definedTests
[info] * Test example.RuleSpec : subclass(false, org.scalatest.Suite)
[info] * Test example.HelloSpec : subclass(false, org.scalatest.Suite)

Inspection of definedTests gives

inspect test:definedTests
[info] Task: scala.collection.Seq[sbt.TestDefinition]
[info] Description:
[info]  Provides the list of defined tests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM