Created
May 7, 2012 20:41
-
-
Save nremond/2630253 to your computer and use it in GitHub Desktop.
Issue with two http confs in Gatling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package basic | |
import com.excilys.ebi.gatling.core.Predef._ | |
import com.excilys.ebi.gatling.http.Predef._ | |
class BasicExampleSimulation extends Simulation { | |
def apply = { | |
val urlBase = "http://excilys-bank-web.cloudfoundry.com" | |
val urlBase2 = "https://excilys-bank-web.cloudfoundry.com" | |
val httpConf = httpConfig.baseURL(urlBase) | |
val httpConf2 = httpConfig.baseURL(urlBase2) | |
val headers_1 = Map( | |
"Accept" -> "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", | |
"Accept-Charset" -> "ISO-8859-1,utf-8;q=0.7,*;q=0.7", | |
"Accept-Encoding" -> "gzip,deflate", | |
"Accept-Language" -> "fr,en-us;q=0.7,en;q=0.3", | |
"Host" -> "excilys-bank-web.cloudfoundry.com", | |
"Keep-Alive" -> "115", | |
"User-Agent" -> "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110422 Ubuntu/9.10 (karmic) Firefox/3.6.17") | |
val scn = scenario("Scenario name") | |
.exec( | |
http("request_1") | |
.get("/") | |
.headers(headers_1) | |
.check(status.is(302))) | |
.pause(0, 100, MILLISECONDS) | |
.exec( | |
http("request_2") | |
.get("/public/login.html") | |
.headers(headers_1)) | |
List(scn.configure.users(10).ramp(10).protocolConfig(httpConf, httpConf2)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment