prosseek
prosseek

Reputation: 190809

Execute multiple Scalatests in IntelliJ

I have multiple IntelliJ (Scala) modules that have build.sbt file and scalatest code.

I also created ScalaTest configurations for each of them.

enter image description here

I can run the test one by one, but is it possible to run all of them at once?

Upvotes: 2

Views: 835

Answers (3)

Trung Nguyen
Trung Nguyen

Reputation: 121

If your project is a maven project, you can try using the 'test' command (in screenshot) to run all tests. This will execute all the tests under your test/scala dir.

enter image description here

Upvotes: 0

Juh_
Juh_

Reputation: 15539

You can run all the scalatest of one module:

  • right click on the (sub)module
  • run >
  • ScalaTests in [module name]

But I don't know How to run all scalatest of a multi-modules sbt with intellij? :-\

Upvotes: 1

prosseek
prosseek

Reputation: 190809

I guess for executing multiple tests, one may need to use sbt aggregation as is explained in Execute multiple Scalatests in sbt.

In IntelliJ IDE, we can just use the ScalaTest for testing and debugging a test for one module.

Using batch mode, one can easily execute the multiple tests with sbt.

Adding module dependency information in sbt's build.sbt file

Upvotes: 0

Related Questions