• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Load testing with gatling
 

Load testing with gatling

on

  • 5,953 views

 

Statistics

Views

Total Views
5,953
Views on SlideShare
5,203
Embed Views
750

Actions

Likes
12
Downloads
31
Comments
0

6 Embeds 750

http://opennaru.tistory.com 553
http://m3dev.github.io 154
https://twitter.com 19
http://localhost 19
http://translate.googleusercontent.com 4
http://cafe.naver.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Load testing with gatling Load testing with gatling Presentation Transcript

    • Load Testing with Gatling Chris Birchall 2013/12/6 #m3dev Tech Talk
    • Existing (free) load test tools ● Siege ○ Simple, classic (first released in 2000?) ○ Limited scripting support ● JMeter ○ Scripting via UI, or lots of XML
    • Gatling ● Powerful scripting using Scala DSL ● Record scenarios from browser, à la Selenium ● Run multiple scenarios in one simulation ● Graphical reports with pretty graphs
    • Getting started 1. Download (gatling-tool.org) and unzip 2. Create a simulation a. write from scratch using DSL, or b. record using Recorder 3. Run bin/gatling.sh a. Interactive CLI - choose simulation to run 4. View HTML report (sample)
    • Scripting DSL val scn = scenario("Scenario name") .exec( http("request_1") .get("/") .headers(headers_1) .check(status.is(302))) .pause(0 milliseconds, 100 milliseconds) .exec(...
    • DSL - Advanced features (1) Loading data from CSV file scenario(“login”) .feed(csv("user_credentials.csv")) .exec( http("request_3") .post("/login") .param("username", "${username}") .param("password", "${password}") ... username,password user1,password1 user2,password2 user3,password3 user4,password4 user5,password5 user6,password6 user7,password7 user8,password8 user9,password9 user10,password10 Can also load from JDBC/Redis/custom file format/...
    • DSL - Advanced features (2) Reading data from page, re-using it later http("find_account_id") .get("/accounts.html") .check(regex("""<td class="number">ACC(d+)</td>""") .saveAs("account_id"))) .pause(7, 8) .exec( http("account_details_page") .get("/account/ACC${account_id}/operations.html") ...
    • Recording scenarios 1. bin/recorder.sh a. starts a Swing GUI 2. Customise scenario config a. set filters to limit which requests are recorded 3. Click “Start!” button a. starts an HTTP proxy on localhost:8000 4. Browse any site via the proxy 5. Click “Stop and save” a. Generates a DSL script
    • Internals ● ● ● ● ● Implemented in Scala AsyncHttpClient, Netty Akka Architecture details Example actor