Which languages can a Gatling simulation be written in, and does each of those languages get its own separate SDK?
answer
- Count the languages, then count the SDKs
- Two JVM layers plus one npm family
- Kotlin rides the Java API unchanged
- Zero Kotlin files in the repository
basics
~20 sGatling simulations are written in Java, Kotlin, Scala, JavaScript or TypeScript. That is five languages but not five SDKs: a Scala core serves Scala, a Java API serves both Java and Kotlin, and one npm package family serves both JavaScript and TypeScript.
solid answer
~40 sGatling advertises five authoring languages — Java, Kotlin, Scala, JavaScript and TypeScript — and that count is honest, but it counts languages rather than shipped SDKs. On the JVM there are two binding layers: the Scala core, and a Java API under the `io.gatling.javaapi` packages that Kotlin consumes unchanged, which is why the Gatling repository contains no Kotlin source at all. JavaScript and TypeScript are served by a single SDK published as npm packages outside that repository, and Gatling's own documentation tabs its examples under four labels with one shared tab covering both. The practical consequence when you pick a language is that Java and Kotlin see exactly the same method surface, and Scala sees a different one.
go deeper
Be ready to name the five languages without hesitating, and to say which one your own simulations are written in.
Be ready to explain that the five languages sit on three delivery layers, and that Kotlin reaches Gatling through the Java API rather than through a Kotlin SDK of its own.
Be ready to say what the layer split costs a real team: examples are not portable between the Scala and Java surfaces, so house examples and reviews have to be language-specific.
Be ready to argue whether a language count belongs on a tool comparison at all, and to reframe it as which single surface your organisation will standardise on and maintain examples for.
Gatling's front page states that test scenarios are "defined as code using expressive SDKs for Java, JavaScript, TypeScript, Scala, or Kotlin". Five names, and each really is a language you can write a working simulation in. What that sentence does not say — and what an interviewer is usually probing — is that the five languages are delivered by **three** layers, not five. ## The three layers behind the five names | Layer | What it actually is | Languages it serves | |---|---|---| | Scala core | the `gatling-core`, `gatling-http`, `gatling-jms`, `gatling-jdbc` and related modules, written in Scala | Scala | | Java API | the `io.gatling.javaapi` packages, written in Java and shipped as `gatling-core-java`, `gatling-http-java` and friends | Java **and** Kotlin | | npm SDK | a family of packages published under the `@gatling.io` scope, released separately from the main repository | JavaScript **and** TypeScript | Two independent measurements back this up. First, the Gatling repository contains **zero Kotlin source files and zero TypeScript source files** — there is nothing there for a Kotlin-specific or TypeScript-specific SDK to be built from. Second, Gatling's documentation site configures its code-sample tabs with **four** labels (`java`, `ts`, `kt`, `scala`), and the `ts` tab is titled "JavaScript", because one sample serves both. ## What "no Kotlin SDK" actually means It does not mean Kotlin is second class. It means something more specific and more useful: * Kotlin calls the **same** classes and the **same** methods that a Java simulation calls, because both are calling the Java API directly. * Anything true of the Java surface is true of the Kotlin surface, including method names, argument types and return types. * Kotlin's only Gatling-specific accommodations are aliases for names that collide with Kotlin keywords, which exist precisely because the underlying API is Java's. * Nothing in the Java API requires you to read, write or compile Scala, even though the engine underneath it is Scala. The same logic applies at the other end: JavaScript and TypeScript are not two SDKs. They are one SDK, and TypeScript users get type declarations for the same package family a JavaScript user installs. ## The divergence that actually bites Because the Scala core and the Java API are two separate code bases, a snippet is not portable between them by copy and paste. The injection **step names** are the same across the layers — the same builder is called the same thing in Scala as in Java — but the surrounding spellings differ. The clearest example is the duration you hand a step: 1. Java and Kotlin take a `java.time.Duration`, for example `Duration.ofMinutes(5)`. 2. Scala takes a Scala duration literal, for example `5.minutes`. 3. JavaScript and TypeScript take an object literal of the form `{ amount: 5, unit: "minutes" }`. 4. All of them additionally accept a bare number, which is interpreted as **seconds**. The entry point that registers a scenario's profile is also spelled differently on the Scala side than on the Java side. So a stale answer copied from a Scala blog post will not compile in a Kotlin simulation, and vice versa — which is why it is worth being explicit about which language a Gatling example was written for rather than talking about "the DSL" as if there were only one. ## Why this matters when you are choosing When a team is comparing load generators, "supports five languages" is often written on the comparison sheet as a differentiator. Read it correctly: * If your team writes **Java or Kotlin**, you get a typed, compiled, IDE-completed API and the JVM build tooling you already run. That is the real benefit, and it is the same benefit for both languages. * If your team writes **JavaScript or TypeScript**, you get a package-manager install and a Node-shaped project, again the same for both. * If your team writes **Scala**, you get the core surface directly. * If your team writes none of those five, the language count buys you nothing. The count is not five independent investments Gatling maintains for you; it is three surfaces mapped onto five languages. Knowing that keeps you from asking a vendor question that has no answer — such as which release the Kotlin SDK is on — and keeps you from assuming that a Scala example is a Kotlin example with different punctuation. ## The claim to get right Say "five authoring languages over two JVM binding layers plus an npm SDK for JavaScript and TypeScript". Do not say "five SDKs", "five artifacts", or "a Kotlin SDK". Every one of those overstates what is shipped, and the first person who greps the repository for a Kotlin file will find nothing there to support it.
- If the Gatling engine is written in Scala, does choosing Java or Kotlin cost you any capability?No. The Java API is a binding layer over the same engine, so the same scenario steps, injection steps, checks and assertions are reachable. What you give up is Scala's own syntax and the ability to paste Scala examples directly; what you gain is not having to introduce Scala into a build and a hiring profile that does not otherwise need it.
- The JavaScript and TypeScript SDK is published separately from the main Gatling repository. What does that change for you?Its version is pinned by your package manager rather than by a JVM build file, and it is installed and upgraded like any other npm dependency. Practically, that means the JavaScript project's dependency list is where you look to answer 'which Gatling are we on', and its own documentation is the reference for that surface.
A menu printed in five languages does not mean five kitchens. Gatling has three kitchens: a Scala one, a Java one that Kotlin also orders from, and a Node one serving JavaScript and TypeScript from the same pass.
saying these in an interview costs you the question
- Claiming Gatling ships a separate Kotlin SDK distinct from the Java one
- Treating JavaScript and TypeScript as two different Gatling SDKs
- Assuming a Scala example compiles unchanged in a Kotlin simulation
- Thinking you must learn Scala because the engine is written in Scala