Script Creation · Apache JMeter

Ways to Create & Record Scripts in JMeter

From built-in recording and browser extensions to manual scripting, Swagger imports, and Selenium integration — 7 methods for every scenario.

01

Built-in JMeter Recording

Medium 🔴

HTTP(S) Test Script Recorder

JMeter acts as a proxy server — captures all browser requests passing through it and auto-creates HTTP Request samplers.
Browser
JMeter Proxy :8888
Application Server
1 Open JMeter GUI
2 File → Templates → Recording
3 Set proxy port 8888
4 Configure browser proxy
5 Install SSL cert for HTTPS
6 Click Start & navigate app
WHAT GETS RECORDED
GET RequestsPOST RequestsAJAX CallsCookiesAuth TokensForm ParamsRedirects
Advantages
  • Native JMeter functionality
  • Real browser traffic capture
  • Easy for beginners
Limitations
  • Requires proxy setup
  • HTTPS cert installation needed
  • Records static resources
  • Correlation still required
02

Browser Extensions & Third-Party

Easy 🧩

BlazeMeter Chrome Extension

Captures browser activity directly and exports as a .jmx file — no proxy, no SSL cert hassle.
1 Install from Chrome Web Store
2 Click Start Recording
3 Perform app workflow
4 Stop & export .jmx
5 Open in JMeter
Advantages
  • No proxy configuration
  • No SSL cert needed
  • Faster & cleaner scripts
  • Beginner friendly
Limitations
  • Complex correlations still manual
  • Browser-based only

BlazeMeter Proxy Recorder

Cloud-based recording for mobile apps, desktop apps, and browsers. Exports optimized SmartJMX files with automatic correlations.
03

Traffic Capture & Conversion

Medium 📡

HAR File Conversion

HTTP Archive (HAR) files store requests, responses, headers, cookies, and timing metrics. Capture in browser DevTools, then convert to JMeter.
F12 → Network Tab
Execute Workflow
Export .har
Convert → .jmx
Advantages
  • No proxy setup
  • Easy traffic capture
  • Good for APIs & troubleshooting
Limitations
  • Requires cleanup
  • Correlation still needed
  • Static resources inflate script

Fiddler / Charles Proxy

Advanced HTTP debugging tools — capture browser, mobile, API, and SSL traffic. Export as HAR/SAZ/raw and convert to JMeter.
Advantages
  • Detailed request analysis
  • Mobile traffic support
  • SSL debugging
Limitations
  • Requires conversion effort
  • Correlation not automatic

PCAP / TCPDump Conversion

Enterprise-level packet capture via Wireshark / tcpdump. Used for low-level network debugging and security analysis.
Network Packets
PCAP File
Converter
.jmx Script
04

Manual Script Creation

Medium ✍️
Extremely common for API performance testing. Testers manually create requests, configure payloads, add assertions and parameterization — no recording needed.
1 Create Thread Group
2 Add HTTP Request sampler
3 Configure server, endpoint, method, payload
4 Add Header Manager
5 Add Assertions & Extractors
POST /api/login
{"username":"admin", "password":"admin123"}
Header: Authorization: Bearer Token
Advantages
  • Very clean scripts
  • Full control over requests
  • Best for APIs/microservices
  • No unwanted resources
Limitations
  • Time-consuming
  • Requires API understanding
  • Manual correlation
05

Swagger / OpenAPI Import

Easy 📄
Modern REST APIs expose Swagger/OpenAPI documentation defining endpoints, payloads, methods, headers, and response models. Import the spec to auto-generate JMeter samplers.
swagger.json / .yaml
Import Tool
JMeter HTTP Samplers
Advantages
  • Fast API script generation
  • Accurate endpoint definitions
  • Great for microservices
Limitations
  • Requires valid API spec
  • Still needs parameterization
06

Advanced Plugins & Automation

Advanced 🔌

JMeter Correlation Recorder Plugin

Automatically detects dynamic values (Session IDs, CSRF tokens, JWT, cookies), creates extractors, and replaces hardcoded values with variables.
Response: <input value="ABC123XYZ">
Plugin → auto-extracts → stores as ${dynamic_var}
→ reuses dynamically in subsequent requests
Advantages
  • Reduces manual effort
  • Faster correlation
  • Easier maintenance
Limitations
  • Can't identify all patterns
07

Selenium Integration

Advanced 🌐

WebDriver Sampler

Integrates Selenium WebDriver with JMeter for real browser automation — essential for JavaScript-heavy apps using React, Angular, or dynamic rendering.
Selenium Browser
WebDriver Sampler
JMeter Metrics
1 Install WebDriver plugins
2 Add WebDriver Sampler
3 Write Selenium code
4 Execute browser actions
5 Collect response metrics
driver.findElement(By.id("login")).click();
Advantages
  • Real browser rendering
  • Supports dynamic UI
  • Handles JS-heavy apps
Limitations
  • Heavy CPU/memory usage
  • Not for large-scale load
  • Slower than HTTP samplers

Final Comparison

MethodBest ForComplexity
JMeter RecorderWeb applicationsMedium
BlazeMeter ExtensionQuick browser recordingEasy
HAR / Fiddler / CharlesExisting traffic / Mobile / API debugMedium
Manual ScriptingAPIs / MicroservicesMedium
Swagger ImportREST APIsEasy
Correlation PluginDynamic applicationsAdvanced
Selenium IntegrationJavaScript-heavy appsAdvanced