Skip to content

Instantly share code, notes, and snippets.

@nremond
Forked from errordeveloper/example1.scala
Created September 10, 2012 15:36
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 nremond/3691602 to your computer and use it in GitHub Desktop.
Save nremond/3691602 to your computer and use it in GitHub Desktop.
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Headers.Names._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.http.check.HttpCheck
import org.glassfish.grizzly.http.util.HttpStatus._
import com.excilys.ebi.gatling.http.request.builder.AbstractHttpRequestWithBodyBuilder
import com.excilys.ebi.gatling.core.structure.ChainBuilder
import jodd.util.StringUtil
import com.ning.http.client._
class TestRandomController extends Simulation {
val PUTS = 50
val GETS = 35
val POSTS = 15
val doGET = pause(1)
val doPUT = pause(2)
val doPOST = pause(3)
val scn = scenario("TestRandomControllerScenario")
.randomSwitch (
PUTS -> doPUT,
GETS -> doGET,
POSTS -> doPOST
)
def apply = { List( scn.configure.users(10) ) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment