Gatling Script Generator
Generate a reviewable Gatling Scala Simulation starting file from injection profiles, scenarios, HTTP or WebSocket requests, checks, feeders, and protocol options.
Gatling is an open-source load testing tool that simulates many users hitting your API or website at the same time, then reports response times, throughput, and errors. This generator turns the form below into a reviewable Simulation.scala starter file: configure the target URL, how users arrive, the requests they make, and the pass/fail checks, then download, review, compile, and run only against an authorized target.
Who it's for
Backend / SRE / QA engineers who need real load numbers without writing Scala from scratch. Beginners and Gatling pros alike.
What you get
A starter Simulation.scala with HTTP protocol, scenarios, requests, checks, and an injection profile. Edit further if needed.
Privacy
Generation occurs in this browser tab. Do not paste live credentials, and review browser/site telemetry policy first.
exec(http(...)) call inside every scenario. Reorder, duplicate, or load a template.import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class GeneratedSimulation extends Simulation {
val httpProtocol = http
.baseUrl("https://example.com")
.acceptHeader("application/json")
.contentTypeHeader("application/json")
val scn1 = scenario("User Journey")
.repeat(1) {
exec(http("Home Page")
.get("/")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Login")
.post("/api/auth/login")
.requestTimeout(10.seconds)
.body(StringBody("""{\"username\":\"${username}\",\"password\":\"${password}\"}"""))
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Get Products")
.get("/api/products")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Product Detail")
.get("/api/products/${id}")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Add To Cart")
.post("/api/cart")
.requestTimeout(10.seconds)
.body(StringBody("""{\"productId\":\"${id}\",\"qty\":1}"""))
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
}
val scn2 = scenario("Browse Products")
.repeat(2) {
exec(http("Home Page")
.get("/")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Login")
.post("/api/auth/login")
.requestTimeout(10.seconds)
.body(StringBody("""{\"username\":\"${username}\",\"password\":\"${password}\"}"""))
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Get Products")
.get("/api/products")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Product Detail")
.get("/api/products/${id}")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Add To Cart")
.post("/api/cart")
.requestTimeout(10.seconds)
.body(StringBody("""{\"productId\":\"${id}\",\"qty\":1}"""))
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
}
val scn3 = scenario("Checkout Flow")
.repeat(1) {
exec(http("Home Page")
.get("/")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Login")
.post("/api/auth/login")
.requestTimeout(10.seconds)
.body(StringBody("""{\"username\":\"${username}\",\"password\":\"${password}\"}"""))
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Get Products")
.get("/api/products")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Product Detail")
.get("/api/products/${id}")
.requestTimeout(10.seconds)
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
.pause(1)
exec(http("Add To Cart")
.post("/api/cart")
.requestTimeout(10.seconds)
.body(StringBody("""{\"productId\":\"${id}\",\"qty\":1}"""))
.check(status.is(200))
.check(responseTimeInMillis.lt(500))
.check(substring("success"))
)
}
setUp(
scn1.inject(
rampUsers(100).during(10.minutes),
constantUsersPerSec(100).during(20.minutes),
rampUsers(100).during(5.minutes)
),
scn2.inject(
rampUsers(100).during(10.minutes),
constantUsersPerSec(100).during(20.minutes),
rampUsers(100).during(5.minutes)
),
scn3.inject(
rampUsers(100).during(10.minutes),
constantUsersPerSec(100).during(20.minutes),
rampUsers(100).during(5.minutes)
)
).protocols(httpProtocol)
}
What is Gatling Script Generator?
Generate a reviewable Gatling Scala Simulation starting file from injection profiles, scenarios, HTTP or WebSocket requests, checks, feeders, and protocol options. Base URL/protocol settings, user injection and ramp/hold/down pattern, scenarios, requests, checks, CSV feeders, repeat/during loops, and optional WebSocket settings. A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
Open the tool
What the tool does
- Input: Base URL/protocol settings, user injection and ramp/hold/down pattern, scenarios, requests, checks, CSV feeders, repeat/during loops, and optional WebSocket settings.
- Controls and processing: Injection users/ramp/hold/down, repeat/during scenarios, HTTP request builder, checks, CSV feeders, protocol options, WebSocket options, preview, and download.
- Output: A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
How to use it
- Provide the input. Base URL/protocol settings, user injection and ramp/hold/down pattern, scenarios, requests, checks, CSV feeders, repeat/during loops, and optional WebSocket settings.
- Review the settings. Injection users/ramp/hold/down, repeat/during scenarios, HTTP request builder, checks, CSV feeders, protocol options, WebSocket options, preview, and download.
- Generate, inspect, and export. A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
Key features
- Input: Base URL/protocol settings, user injection and ramp/hold/down pattern, scenarios, requests, checks, CSV feeders, repeat/during loops, and optional WebSocket settings.
- Controls and processing: Injection users/ramp/hold/down, repeat/during scenarios, HTTP request builder, checks, CSV feeders, protocol options, WebSocket options, preview, and download.
- Output: A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
Useful workflows
- Generate a reviewable Gatling Scala Simulation starting file from injection profiles, scenarios, HTTP or WebSocket requests, checks, feeders, and protocol options.
- Use it when you need this deliverable or diagnostic result: A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
- Place it before the next verified workflow step: compiling in the target Gatling project, running an authorized smoke test, and ramping gradually under monitoring.
Limits and safety notes
- The generator does not execute Gatling or guarantee compilation. Scala DSL and project structure vary by Gatling version and build tool; dependencies, imports, feeders, session variables, checks, TLS, authentication, and target authorization must be reviewed.
Troubleshooting
- Start with one authorized request and the smallest scenario; confirm the target tool version, syntax, imports or dependencies, and data references in the real project.
- Move credentials to environment variables or secret management, compile or lint the generated file, then run a low-load smoke test before any ramp-up.
- The generator does not execute Gatling or guarantee compilation. Scala DSL and project structure vary by Gatling version and build tool; dependencies, imports, feeders, session variables, checks, TLS, authentication, and target authorization must be reviewed.
Frequently asked questions
What is Gatling Script Generator?
Generate a reviewable Gatling Scala Simulation starting file from injection profiles, scenarios, HTTP or WebSocket requests, checks, feeders, and protocol options.
How do I use Gatling Script Generator?
Provide the expected input, review the page settings, then verify the result before copying or downloading it. Expected output: A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
What input does it accept?
Base URL/protocol settings, user injection and ramp/hold/down pattern, scenarios, requests, checks, CSV feeders, repeat/during loops, and optional WebSocket settings.
What output does it produce?
A downloadable Scala Simulation.scala starting file containing configured injection, scenarios, protocol, requests, checks, and feeders.
What are the limits?
The generator does not execute Gatling or guarantee compilation. Scala DSL and project structure vary by Gatling version and build tool; dependencies, imports, feeders, session variables, checks, TLS, authentication, and target authorization must be reviewed.
Related AppKiro tools
Start with a verified input
Generate the smallest script, review it in the target project, and run it only against an authorized non-production system before any controlled ramp-up.
Open the tool