Load testing with us

Load testing with us is a simple four step process, let us show you how

The four steps of load testing

Planning

Before you begin creating tests, define your testing goals and then put together a test plan to achieve those goals. Are you just trying to establish a performance baseline? Want to understand when and how your system falls apart when reaching it's breaking point? Or maybe you're looking to automate your load testing to avoid performance regressions.

Configuration

When it comes to actually expressing what you want to test using user scenarios and simulated traffic configuration, we have several options that spans beginner to advanced.

Scripting

Use the simple yet powerful Lua programming language to create advanced load testing scenarios. This includes complex flows, randomized and parameterized requests as well as HTTP basic, HTTP digest, token or NTLM based authentication.

Learn More

Chrome recorder

Use our Chrome recorder to quickly record a user scenario by browsing around in your Chrome browser.

Learn More

Postman converter

If you're testing APIs and already have your endpoints defined in a Postman collection, use our conversion tool to convert them into Lua user scenario scripts.

Learn More

URL analyzer

If you're testing a website and you're at the beginning of the performance testing learning curve, its easy to get started with the URL analyzer. It lets you create user scenarios from just a URL as a starting point.

Learn More

script.lua

local ds = datastore.open("users")
local row = ds:get_random()

local r = http.post{
    url="https://api.loadimpact.com/v3/account/login",
    headers={ ["Content-Type"]="application/json" },
    data=json.stringify({["email"]=row[1], ["password"]=row[2]}),
    response_body_bytes=10000
}
if r.status_code ~= 200 then
    result.custom_metric("login.failure", 1)
    if test.get_clients() == 1 then
        test.abort()
    end
end

result.custom_metric("login.time_to_first_byte", r.time_to_first_byte)

local data = json.parse(r.body)
r = http.get{
    url="https://api.loadimpact.com/v3/account/me",
    headers={ ["Authorization"]="Token "..data.token.key }
}

client.sleep(math.random(10, 20))
loadimpact-chrome-recorder.png

Install our Chrome extension to easily record a browser session to use as the script for the virtual users in your load tests.

 

ChromeWebStore_BadgeWBorder_v2_206x58.png

postman-logo+text-320x132.png

 

Step 1

Download our converter for turning your Postman collections into load tests.

 

Download

 

 

Step 2

Run the converter passing in your Postman collection

 

Terminal

postman-to-loadimpact path/my-collection.json -o path/my-collection.lua

Step 3

Create a user scenario from the generated Lua script, and add it to a test. Done!

loadimpact-scenario-new.png

The quickest way to get up and running is by using our URL analyzer. It takes a URL as input, and based on a page load of that URL will generate a Lua script.

Execution

Trigger test runs on your own terms

Manually

From the web app UI you can trigger tests to start on-demand at a moments notice. No need to worry about global infrastructure provisioning and teardown, we got that covered.

Scheduling

Set up one-off or recurring test runs using the scheduling feature built into the Load Impact platform. You can get notifications via our integrations with Slack/HipChat/Webhook.

Automation

Use the Load Impact CLI or API to interact with the Load Impact platform. Create user scenarios, upload data stores for test parameterization, or trigger test runs based on code commits from your CI tool.

Learn More

loadimpact-test-overview.png
loadimpact-test-scheduling.png
Terminal

$ pip install loadimpact-cli
$ loadimpact test run 
TEST_RUN_ID:
123456789
Initializing test ...
TIMESTAMP:                VUs [1]:         reqs/s [1]:      bandwidth [1]:   user load time [1]: failure rate [1]:
2018-04-20 17:32:23+00:00 1.0              1.65880228503    444675.79207     -                   -
2018-04-20 17:33:00+00:00 2.0              1.65655724996    444309.858371    -                   -
2018-04-20 17:33:03+00:00 2.0              1.65174480411    442789.175918    150.41              -
2018-04-20 17:33:36+00:00 2.0              3.31532339156    889063.643269    150.595             -
2018-04-20 17:34:03+00:00 2.0              1.65779745031    444464.780093    124.19              -
2018-04-20 17:34:06+00:00 3.0              1.65459748111    443768.339145    119.52              -
...

Analysis

Track all the essential performance testing metrics you need. On top of that, performance trending helps you keep track of your performance progress.

Essential performance metrics

Collect all the essential performance metrics for your test runs: response times, throughput, availability and utilization metrics.

Custom metrics

Maybe one of your important performance KPIs is not included out-of-the-box. Use custom metrics to track whatever you want. Track finer grained network metrics like latency/time-to-first-byte, TCP connection time and TLS handshake time.

Pass/fail with thresholds

Configure your tests with metric thresholds to get a pass or fail for every test run. This is an essential step for performance testing automation.

loadimpact-test-results-metrics.png

 

Plot individual metrics (general, URL, pages, custom or server metrics) or add them to the main chart for easier correlation.

Step 1

Create a custom metric in your script to collect the result data you need.

 

script.lua

local r = http.get("http://test.loadimpact.com/")
result.custom_metric("latency", r.time_to_first_byte)

Step 2

Set thresholds based on the custom metric (see last point) in your test config and plot the metric on the result page.

 

loadimpact-test-result-custom-metric-plot-settings.png

Step 1

Add thresholds to you test configuration.

 

loadimpact-test-config-thresholds-only.png

 

Step 2

See the test pass/fail status on the test result page.

 

loadimpact-test-result-thresholds-with-status.png