Created
January 7, 2015 14:35
-
-
Save ivanursul/6417fbc05aa99fa8d89f to your computer and use it in GitHub Desktop.
IntegrationTest.scala for ivanursul.com
This file contains hidden or 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 org.lnu.is.integration | |
| import org.lnu.is.integration.adminunit.AdminUnitIntegrationTest | |
| import io.gatling.core.Predef._ | |
| import io.gatling.core.Predef.Simulation | |
| import io.gatling.core.Predef.atOnceUsers | |
| import io.gatling.core.Predef.stringToExpression | |
| import io.gatling.http.Predef._ | |
| import io.gatling.http.Predef.http | |
| import io.gatling.http.config.HttpProtocolBuilder.toHttpProtocol | |
| import io.gatling.jdbc.Predef._ | |
| class IntegrationTest extends Simulation { | |
| val host = System.getProperty("integration.host") | |
| val successPercent = Integer.getInteger("integration.successtests.percent", 95) | |
| val httpConf = http | |
| .baseURL(host) | |
| .acceptHeader("application/json") | |
| val injectStep = atOnceUsers(1); | |
| setUp( | |
| AdminUnitIntegrationTest.scn.inject(injectStep) | |
| ) | |
| .protocols(httpConf) | |
| .assertions(global.successfulRequests.percent.greaterThan(successPercent)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment