Skip to main content
appkiro.com

Генератор скриптов Gatling

Создайте проверяемую заготовку Gatling Scala Simulation из injection profiles, scenarios, HTTP/WebSocket requests, checks, feeders и protocol options.

What is this tool?
A visual builder for a Gatling Scala starter simulation that still requires review in the destination project.

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.

Что вы получите

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.

1. Users (injection)
How virtual users will be injected over time.
2. Scenarios (flows)
Each scenario wraps every HTTP request below in its own loop.
1
2
3
3. HTTP-запросы
Each row becomes one exec(http(...)) call inside every scenario. Reorder, duplicate, or load a template.
1
2
3
4
5
4. Проверки
Validate responses on every request.
5. Data feeder (optional)
Inject parameterized data from a CSV/JSON file.
Enable
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)
}
Что вы получите
Complete Gatling Simulation.scala
Project structure ready
Run instructions for your OS
HTML report after the test run

Что такое Генератор скриптов Gatling?

Создайте проверяемую заготовку Gatling Scala Simulation из injection profiles, scenarios, HTTP/WebSocket requests, checks, feeders и protocol options. Base URL/protocol, user injection и ramp/hold/down, scenarios, requests, checks, CSV feeders, repeat/during и WebSocket options. Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.

Открыть инструмент

Что делает инструмент

  • Входные данные: Base URL/protocol, user injection и ramp/hold/down, scenarios, requests, checks, CSV feeders, repeat/during и WebSocket options.
  • Настройки и обработка: Injection users/ramp/hold/down, repeat/during, HTTP request builder, checks, CSV feeders, protocol/WebSocket options, preview и download.
  • Результат: Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.

Как пользоваться

  1. Добавьте входные данные. Base URL/protocol, user injection и ramp/hold/down, scenarios, requests, checks, CSV feeders, repeat/during и WebSocket options.
  2. Проверьте настройки. Injection users/ramp/hold/down, repeat/during, HTTP request builder, checks, CSV feeders, protocol/WebSocket options, preview и download.
  3. Создайте, проверьте и экспортируйте результат. Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.

Основные возможности

  • Входные данные: Base URL/protocol, user injection и ramp/hold/down, scenarios, requests, checks, CSV feeders, repeat/during и WebSocket options.
  • Настройки и обработка: Injection users/ramp/hold/down, repeat/during, HTTP request builder, checks, CSV feeders, protocol/WebSocket options, preview и download.
  • Результат: Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.

Когда пригодится

  • Создайте проверяемую заготовку Gatling Scala Simulation из injection profiles, scenarios, HTTP/WebSocket requests, checks, feeders и protocol options.
  • Используйте, когда нужен такой результат или диагностический вывод: Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.
  • Поставьте инструмент перед следующим проверенным этапом: компиляцией в целевом Gatling project, разрешённым smoke test и постепенным ramp-up с мониторингом.

Ограничения и безопасность

  • Генератор не запускает Gatling и не гарантирует компиляцию. Scala DSL и структура зависят от версии/build tool; dependencies, imports, feeders, session variables, checks, TLS, auth и разрешение цели требуют проверки.

Устранение неполадок

  • Начните с одного разрешённого запроса и минимального scenario; проверьте версию целевого инструмента, синтаксис, imports/dependencies и ссылки на данные в реальном проекте.
  • Перенесите credentials в переменные окружения или secret management, скомпилируйте/проверьте файл и выполните низконагрузочный smoke test до ramp-up.
  • Генератор не запускает Gatling и не гарантирует компиляцию. Scala DSL и структура зависят от версии/build tool; dependencies, imports, feeders, session variables, checks, TLS, auth и разрешение цели требуют проверки.

Частые вопросы

Что такое Генератор скриптов Gatling?

Создайте проверяемую заготовку Gatling Scala Simulation из injection profiles, scenarios, HTTP/WebSocket requests, checks, feeders и protocol options.

Как пользоваться Генератор скриптов Gatling?

Добавьте ожидаемые данные, проверьте параметры страницы и сверяйте результат перед копированием или скачиванием. Ожидаемый результат: Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.

Какие входные данные поддерживаются?

Base URL/protocol, user injection и ramp/hold/down, scenarios, requests, checks, CSV feeders, repeat/during и WebSocket options.

Какой результат создаёт инструмент?

Скачиваемый стартовый Scala Simulation.scala с injection, scenarios, protocol, requests, checks и feeders.

Какие есть ограничения?

Генератор не запускает Gatling и не гарантирует компиляцию. Scala DSL и структура зависят от версии/build tool; dependencies, imports, feeders, session variables, checks, TLS, auth и разрешение цели требуют проверки.

Связанные инструменты AppKiro

Начните с проверенного примера

Создайте минимальный скрипт, проверьте его в целевом проекте и запускайте только против разрешённой не-production системы до контролируемого ramp-up.

Открыть инструмент