Hi everybody,
I’m a newby to Galt, so i just imported this project https://github.com/gatling/gatling-maven-plugin-demo/tree/4ce09cd119111281fe29ac40d1ea9a659c86fd5f on eclipse
after that i write a simple scenario ( a post request to a server on my localhost )
cause i’m sure that the web service will take 5 minutes to give a response
i do :
package computerdatabase
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
import java.util
class DownloadDataSimulation extends Simulation {
val httpConf = http
.baseURL(“http://localhost:8080/planning-ws”) // Here is the root for all relative URLs
.acceptHeader(“text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8”) // Here are the common headers
.acceptEncodingHeader(“gzip, deflate”)
.acceptLanguageHeader(“en-US,en;q=0.5”)
.userAgentHeader(“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)
val download_scenario = scenario(“Scenario Name”) // A scenario is a chain of requests and pauses
.exec(
http(“download data”)
.post("/provision/findBySamplerId")
.header(“Keep-Alive”, “3600000”)
.body (RawFileBody(“downloadingInput.json”))
.asJSON
)
setUp(download_scenario.inject(atOnceUsers(1)).protocols(httpConf))
}
and i changed galting.conf to: