Define Custom Tasks 

Define a Task that runs tests in specific sub-projects 

Consider a hypothetical multi-build project with 3 subprojects. The following defines a task myTestTask that will run the test Task in specific subprojects core and tools but not client:

lazy val core ="./core"))
lazy val tools ="./tools"))
lazy val client ="./client"))

lazy val myTestTask = TaskKey[Unit]("my-test-task")

myTestTask <<= Seq(
  test in (core, Test)
  test in (tools, Test)


sbt Reference Manual
    1. Define Custom Tasks