Skip to content

Instantly share code, notes, and snippets.

@slawekradzyminski
Created January 21, 2023 18:55
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 slawekradzyminski/2e0b02746c44be6c34fadbdf4e608ed9 to your computer and use it in GitHub Desktop.
Save slawekradzyminski/2e0b02746c44be6c34fadbdf4e608ed9 to your computer and use it in GitHub Desktop.
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class SimpleLoadTest extends Simulation {
val httpConf = http.baseUrl("http://localhost:8080")
.acceptHeader("application/json")
val scn = scenario("Simple Load Test")
.exec(http("request_1")
.get("/api/endpoint")
.check(status.is(200))
.check(jsonPath("$.key").is("value"))
)
setUp(
scn.inject(
constantUsersPerSec(10) during (10 seconds)
).protocols(httpConf)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment