Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the list of all test?

Tags:

scala

sbt

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?

like image 584
softshipper Avatar asked Jul 07 '19 20:07

softshipper


1 Answers

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.
like image 86
Mario Galic Avatar answered Nov 20 '22 21:11

Mario Galic