Are there any full examples of how to use the Assertions functionality? I’m trying to get a simulation to appear to be failed so that maven will fail as well, but get compiler errors when using the below (or when I move assertThat to other lines). Thanks
basic.scala
package basic
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import akka.util.duration._
import bootstrap._
import java.net.URLEncoder
class basic extends Simulation {
val httpConf = httpConfig
.baseURL(“http://www.google.com”)
.disableFollowRedirect
.disableWarmUp
.requestInfoExtractor( (request: Request) => { ListString } )
.responseInfoExtractor( (response: Response) => { ListString } )
val scn = scenario(“Scenario name”)
.exec(
http(“Robots”)
.get(“/robots.txt”)
.check(status.is(400))
)
setUp(scn.users(1).protocolConfig(httpConf))
assertThat(
global.failedRequests.percent.is(0)
)
}
Console Output