I think that, all code that i have is the following
package basic
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import io.gatling.http.Headers.Names._
import scala.concurrent.duration._
import bootstrap._
import assertions._
class BasicExampleSimulation extends Simulation {
val httpProtocol = http
.baseURL(“http://localhost:8084/test2/index.jsp”)
.acceptCharsetHeader(“ISO-8859-1,utf-8;q=0.7,;q=0.7")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,/*;q=0.8”)
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3”)
.disableFollowRedirect
val headers_1 = Map(
“Keep-Alive” → “115”)
val headers_3 = Map(
“Keep-Alive” → “115”,
“Content-Type” → “application/x-www-form-urlencoded”)
val headers_6 = Map(
“Accept” → “application/json, text/javascript, /; q=0.01”,
“Keep-Alive” → “115”,
“X-Requested-With” → “XMLHttpRequest”)
val scn = scenario(“prueba geiner”)
.group(“Login”) {
exec(
http(“request_2”)
.get(“http://localhost:8084/test2/index.jsp”)
.headers(headers_1))
.pause(12, 13)
.exec(
http(“request_3”)
.post(“sesion1.jsp”)
.param(“user”, “geiner”)
.param(“pass”, “111”)
.headers(headers_3))
}
setUp(scn.inject(ramp(5 users) over (10 seconds)))
.protocols(httpProtocol)
.assertions(
global.successfulRequests.percent.is(100), details(“Login” / “request_3”).responseTime.max.lessThan(2000),
details(“request_3”).requestsPerSec.greaterThan(10))
}