Skip to content

Instantly share code, notes, and snippets.

Created January 12, 2013 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4517979 to your computer and use it in GitHub Desktop.
Save anonymous/4517979 to your computer and use it in GitHub Desktop.
package local
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 assertions._
import java.net.URLEncoder
class RecordedAdSpotSimulationProdTest extends Simulation {
val httpConf = httpConfig
.baseURL("http://localhost.local:8070")
.acceptHeader("*/*")
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("en-US,en;q=0.5")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/20100101 Firefox/18.0")
val headers_ps = Map(
"Connection" -> "keep-alive"
)
val chain = exec(http("affilliate html")
.get("http://localhost.local/index.html")
.check(status.is(200))
)
.pause(90 milliseconds)
.exec(http("ps.jsp")
.get("http://localhost.local/ps.jsp")
.headers(headers_ps)
)
val scn = scenario("stress test")
.group("full html"){exec(chain)}
setUp(scn.users(2000).ramp(57).protocolConfig(httpConf))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment