Created
January 21, 2023 18:55
-
-
Save slawekradzyminski/2e0b02746c44be6c34fadbdf4e608ed9 to your computer and use it in GitHub Desktop.
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
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