0
votes

I write a Scala project managed by SBT and I want to use TestKit package (http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-testkit.html#TestKit).

In order to do it, I have to do the following imports:

import system.dispatcher
import akka.pattern.pipe

The problem is that I have to update build.sbt file in order to "bring" the needed dependencies. I tried to add the following dependency:

"com.typesafe.akka" %% "akka-http-testkit" % 2.4.2

and I still got an error for the lines:

import system.dispatcher

and

val probe = TestProbe()

Can you give me a hint on how to find the needed dependency given an import line?

1
did you do execute the reload command at the sbt terminal after making the change? Do a reload and then execute build at the sbt terminal and see if its picked up. - Som Bhattacharyya

1 Answers

0
votes

Try to add:

"com.typesafe.akka" %% "akka-http-testkit" % 2.4.2 % Test

akka-http-teskit is a test library, so you should be adding it to the Test scope.