Skip to content

Instantly share code, notes, and snippets.

@errordeveloper
Created September 10, 2012 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save errordeveloper/3690803 to your computer and use it in GitHub Desktop.
Save errordeveloper/3690803 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 = chain.pause(1)
val doPUT = chain.pause(2)
val doPOST = chain.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