我有这个加特林模拟:
package package_name
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class PerformanceTest extends Simulation {
private val httpConfiguration = http
.baseURL(Configuration.baseUrl)
.acceptEncodingHeader("gzip, deflate")
.userAgentHeader(Configuration.userAgentName)
.inferHtmlResources()
.maxConnectionsPerHostLikeChrome
.disableClientSharing
.extraInfoExtractor(dumpSessionOnFailure)
}
其中配置很简单object Configuration { ... }
。
Gatling 不会编译测试,并说明此错误消息:
[...]\performance-test\src\gatling\scala\package_name\performance\test\PerformanceTest.scala:
could not find implicit value for parameter configuration: io.gatling.core.config.GatlingConfiguration
private val httpConfiguration = http
^
one error found
我该如何解决这个错误?