Packages

trait ScalaTest extends BaseClass with TestModule

TestModule that uses ScalaTest Framework to run tests. You need to provide the scalatest dependencies yourself.

Source
TestModule.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalaTest
  2. TestModule
  3. TaskModule
  4. RunModule
  5. WithZincWorker
  6. JavaModuleBase
  7. BspModule
  8. Module
  9. BaseClass
  10. Cacher
  11. Cacher
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def compile: T[CompilationResult]
    Definition Classes
    TestModule

Concrete Value Members

  1. object millInternal extends Internal

    Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill

    Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill

    Definition Classes
    Module
    Annotations
    @internal()
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##: Int
    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def allLocalMainClasses: T[Seq[String]]
    Definition Classes
    RunModule
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def bspBuildTarget: BspBuildTarget

    Use to fill most fields of BuildTarget.

    Use to fill most fields of BuildTarget.

    Definition Classes
    TestModuleBspModule
  8. def bspBuildTargetData: define.Task[Option[(String, AnyRef)]]

    Use to populate the BuildTarget.{dataKind,data} fields.

    Use to populate the BuildTarget.{dataKind,data} fields.

    Mill specific implementations: - JvmBuildTarget - ScalaBuildTarget

    Definition Classes
    BspModule
    Annotations
    @internal()
  9. def bspDisplayName: String
    Definition Classes
    BspModule
  10. def bspDisplayName0: String
    Definition Classes
    BspModule
  11. def cachedTarget[T](t: => T)(implicit c: Enclosing): T
    Attributes
    protected[this]
    Definition Classes
    Cacher → Cacher
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  13. def defaultCommandName(): String

    The name of the default command, which will be automatically executed if the module name is provided at the Mill command line.

    The name of the default command, which will be automatically executed if the module name is provided at the Mill command line.

    Definition Classes
    TestModuleTaskModule
  14. def discoveredTestClasses: T[Seq[String]]
    Definition Classes
    TestModule
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalMainClass: T[String]
    Definition Classes
    RunModule
  18. def finalMainClassOpt: T[Either[String, String]]
    Definition Classes
    RunModule
  19. def forkArgs: T[Seq[String]]

    Any command-line parameters you want to pass to the forked JVM.

    Any command-line parameters you want to pass to the forked JVM.

    Definition Classes
    RunModule
  20. def forkEnv: T[Map[String, String]]

    Any environment variables you want to pass to the forked JVM.

    Any environment variables you want to pass to the forked JVM.

    Definition Classes
    RunModule
  21. def forkWorkingDir: T[Path]
    Definition Classes
    RunModule
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  23. def getTestEnvironmentVars(args: String*): define.Command[(String, String, String, Seq[String])]
    Definition Classes
    TestModule
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def ivyDeps: T[Agg[Dep]]
    Definition Classes
    JavaModuleBase
  27. def localRunClasspath: T[Seq[api.PathRef]]

    The elements of the run classpath which are local to this module.

    The elements of the run classpath which are local to this module. This is typically the output of a compilation step and bundles runtime resources.

    Definition Classes
    RunModule
  28. def mainClass: T[Option[String]]

    Allows you to specify an explicit main class to use for the run command.

    Allows you to specify an explicit main class to use for the run command. If none is specified, the classpath is searched for an appropriate main class to use if one exists.

    Definition Classes
    RunModule
  29. implicit def millModuleBasePath: BasePath
    Definition Classes
    Module
  30. def millModuleDirectChildren: Seq[define.Module]
    Definition Classes
    Module
  31. implicit def millModuleExternal: External
    Definition Classes
    Module
  32. implicit def millModuleSegments: Segments
    Definition Classes
    Module
  33. implicit def millModuleShared: Foreign
    Definition Classes
    Module
  34. def millOuterCtx: Ctx
    Definition Classes
    BaseClass
  35. def millSourcePath: Path
    Definition Classes
    Module
  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  38. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  39. def resources: T[Seq[api.PathRef]]
    Definition Classes
    JavaModuleBase
  40. def run(args: define.Task[Args] = Task.Anon(Args())): define.Command[Unit]

    Runs this module's code in a subprocess and waits for it to finish

    Runs this module's code in a subprocess and waits for it to finish

    Definition Classes
    RunModule
  41. def runBackgroundLogToConsole: Boolean

    If true, stdout and stderr of the process executed by runBackground or runMainBackground is sent to mill's stdout/stderr (which usually flow to the console).

    If true, stdout and stderr of the process executed by runBackground or runMainBackground is sent to mill's stdout/stderr (which usually flow to the console).

    If false, output will be directed to files stdout.log and stderr.log in runBackground.dest (or runMainBackground.dest)

    Definition Classes
    RunModule
  42. def runBackgroundRestartDelayMillis: T[Int]
    Definition Classes
    RunModule
  43. def runBackgroundTask(mainClass: define.Task[String], args: define.Task[Args] = Task.Anon(Args())): define.Task[Unit]
    Definition Classes
    RunModule
  44. def runClasspath: T[Seq[api.PathRef]]

    All classfiles and resources including upstream modules and dependencies necessary to run this module's code.

    All classfiles and resources including upstream modules and dependencies necessary to run this module's code.

    Definition Classes
    RunModule
  45. def runForkedTask(mainClass: define.Task[String], args: define.Task[Args] = Task.Anon(Args())): define.Task[Unit]

    Runs this module's code in a subprocess and waits for it to finish

    Runs this module's code in a subprocess and waits for it to finish

    Definition Classes
    RunModule
  46. def runLocal(args: define.Task[Args] = Task.Anon(Args())): define.Command[Unit]

    Runs this module's code in-process within an isolated classloader.

    Runs this module's code in-process within an isolated classloader. This is faster than run, but in exchange you have less isolation between runs since the code can dirty the parent Mill process and potentially leave it in a bad state.

    Definition Classes
    RunModule
  47. def runLocalTask(mainClass: define.Task[String], args: define.Task[Args] = Task.Anon(Args())): define.Task[Unit]
    Definition Classes
    RunModule
  48. def runMain(mainClass: String, args: String*): define.Command[Unit]

    Same as run, but lets you specify a main class to run

    Same as run, but lets you specify a main class to run

    Definition Classes
    RunModule
  49. def runMainBackground(mainClass: String, args: String*): define.Command[Unit]

    Same as runBackground, but lets you specify a main class to run

    Same as runBackground, but lets you specify a main class to run

    Definition Classes
    RunModule
  50. def runMainLocal(mainClass: String, args: String*): define.Command[Unit]

    Same as runLocal, but lets you specify a main class to run

    Same as runLocal, but lets you specify a main class to run

    Definition Classes
    RunModule
  51. def runUseArgsFile: T[Boolean]

    Control whether run*-targets should use an args file to pass command line args, if possible.

    Control whether run*-targets should use an args file to pass command line args, if possible.

    Definition Classes
    RunModule
  52. def runner: define.Task[Runner]
    Definition Classes
    RunModule
  53. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  54. def test(args: String*): define.Command[(String, Seq[TestResult])]

    Discovers and runs the module's tests in a subprocess, reporting the results to the console.

    Discovers and runs the module's tests in a subprocess, reporting the results to the console.

    Definition Classes
    TestModule
    See also

    testCached

  55. def testCached: T[(String, Seq[TestResult])]

    Discovers and runs the module's tests in a subprocess, reporting the results to the console.

    Discovers and runs the module's tests in a subprocess, reporting the results to the console. If no input has changed since the last run, no test were executed.

    Definition Classes
    TestModule
    See also

    test()

  56. def testCachedArgs: T[Seq[String]]

    Args to be used by testCached.

    Args to be used by testCached.

    Definition Classes
    TestModule
  57. def testClasspath: T[Seq[api.PathRef]]

    The classpath containing the tests.

    The classpath containing the tests. This is most likely the output of the compilation target. By default, this uses the result of localRunClasspath, which is most likely the result of a local compilation.

    Definition Classes
    TestModule
  58. def testForkGrouping: T[Seq[Seq[String]]]

    How the test classes in this module will be split into multiple JVM processes and run in parallel during testing.

    How the test classes in this module will be split into multiple JVM processes and run in parallel during testing. Defaults to all of them running in one process sequentially, but can be overriden to split them into separate groups that run in parallel.

    Definition Classes
    TestModule
  59. def testFramework: T[String]

    The test framework to use.

    The test framework to use.

    For convenience, you can also mix-in one of these predefined traits: - TestModule.Junit4 - TestModule.Junit5 - TestModule.Munit - TestModule.ScalaTest - TestModule.Specs2 - TestModule.TestNg - TestModule.Utest - TestModule.Weaver - TestModule.ZioTest

    Definition Classes
    ScalaTestTestModule
  60. def testLocal(args: String*): define.Command[(String, Seq[TestResult])]

    Discovers and runs the module's tests in-process in an isolated classloader, reporting the results to the console

    Discovers and runs the module's tests in-process in an isolated classloader, reporting the results to the console

    Definition Classes
    TestModule
  61. def testOnly(args: String*): define.Command[(String, Seq[TestResult])]

    Discovers and runs the module's tests in a subprocess, reporting the results to the console.

    Discovers and runs the module's tests in a subprocess, reporting the results to the console. Arguments before "--" will be used as wildcard selector to select test classes, arguments after "--" will be passed as regular arguments. testOnly *foo foobar bar* -- arguments will test only classes with name (includes package name) 1. end with "foo", 2. exactly "foobar", 3. start with "bar", with "arguments" as arguments passing to test framework.

    Definition Classes
    TestModule
  62. def testReportXml: T[Option[String]]

    Sets the file name for the generated JUnit-compatible test report.

    Sets the file name for the generated JUnit-compatible test report. If None is set, no file will be generated.

    Definition Classes
    TestModule
  63. def testSandboxWorkingDir: T[Boolean]

    Whether to use the test task destination folder as the working directory when running tests.

    Whether to use the test task destination folder as the working directory when running tests. true means test subprocess run in the .dest/sandbox folder of the test task, providing better isolation and encouragement of best practices (e.g. not reading/writing stuff randomly from the project source tree). false means the test subprocess runs in the project root folder, providing weaker isolation.

    Definition Classes
    TestModule
  64. def testTask(args: define.Task[Seq[String]], globSelectors: define.Task[Seq[String]]): define.Task[(String, Seq[TestResult])]

    The actual task shared by test-tasks that runs test in a forked JVM.

    The actual task shared by test-tasks that runs test in a forked JVM.

    Attributes
    protected
    Definition Classes
    TestModule
  65. def testUseArgsFile: T[Boolean]

    Controls whether the TestRunner should receive its arguments via an args-file instead of a long parameter list.

    Controls whether the TestRunner should receive its arguments via an args-file instead of a long parameter list. Defaults to what runUseArgsFile return.

    Definition Classes
    TestModule
  66. def toString(): String
    Definition Classes
    Module → AnyRef → Any
  67. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  69. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  70. def zincWorker: ModuleRef[ZincWorkerModule]
    Definition Classes
    WithZincWorker

Deprecated Value Members

  1. def doRunBackground(taskDest: Path, runClasspath: Seq[api.PathRef], zwBackgroundWrapperClasspath: Agg[api.PathRef], forkArgs: Seq[String], forkEnv: Map[String, String], finalMainClass: String, forkWorkingDir: Path, runUseArgsFile: Boolean, backgroundOutputs: Option[(ProcessOutput, ProcessOutput)])(args: String*): (Ctx) => Result[Unit]
    Attributes
    protected
    Definition Classes
    RunModule
    Annotations
    @deprecated
    Deprecated

    (Since version Mill 0.12.0) Binary compat shim, use .runner().run(..., background=true)

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from TestModule

Inherited from define.TaskModule

Inherited from RunModule

Inherited from WithZincWorker

Inherited from JavaModuleBase

Inherited from BspModule

Inherited from define.Module

Inherited from BaseClass

Inherited from Cacher

Inherited from Cacher

Inherited from AnyRef

Inherited from Any

Ungrouped