Recording Web Traffic, HTTP(S) Test Script Recorder, and Certificate Setup: Configuration, Design Patterns, and Trade-Offs
The recorder is valuable when it reduces discovery cost without expanding trust, privacy, or maintenance risk. The right decision depends on how many unknown requests exist, whether HTTPS interception is necessary, whether the browser session contains unrelated state, and whether the final performance question is about business calls or page resources.
Learning objectives
- Choose manual HTTP Request construction or recorder bootstrap from discovery complexity.
- Decide whether HTTPS interception is necessary or HTTP/local API authoring is sufficient.
- Balance include/exclude filters against visibility and capture noise.
- Separate embedded-resource/load questions from business-call testing.
- Choose browser-profile isolation based on trust and privacy boundaries.
- Prefer one preserved raw recording plus refactoring over repeated uncontrolled captures.
1. The mandatory learning path remains free and local
localhost:8080/8443 through local recorder
127.0.0.1:8888.
Managed browser farms, paid load clouds, corporate proxies,
enterprise identity, Kubernetes, remote RMI, and production
recording are optional concepts only.
2. Manual plan construction versus recorder bootstrap
| Manual construction | Recorder bootstrap |
|---|---|
| Best when API/endpoints are already documented and few. | Best when browser traffic contains unknown paths/parameters/redirects. |
| No interception CA required for HTTPS replay authoring. | HTTPS discovery adds temporary CA trust and proxy-state risk. |
| Produces minimal plan from the start. | Produces rough draft requiring cleanup/correlation. |
| Easy code review and stable labels. | Fast discovery but browser-specific headers/assets can create noise. |
For REST APIs with OpenAPI/cURL examples, manual construction is often cleaner. For a legacy web journey with poorly documented form traffic, one controlled recording can save substantial discovery time.
3. HTTP recording versus HTTPS recording
Local HTTP is ideal for proving proxy routing and filters because no browser CA trust is needed. HTTPS recording is necessary when TLS-protected traffic is the real interface and parameters/redirect behavior differ.
HTTPS recording adds two trust relationships: browser trusts JMeter recorder CA, and JMeter connects to the target TLS endpoint. The first relationship is the security-sensitive one this chapter isolates in a disposable Firefox profile.
4. Include/exclude filters: narrow capture versus diagnostic visibility
Narrow includes reduce accidental capture of unrelated hosts. Excludes reduce assets/noise. Over-filtering can hide a necessary redirect or business call, while under-filtering increases secret exposure and cleanup work.
Recommended sequence: start with a strict host include, perform one
tiny observation, then add extension/path exclusions based on
evidence. Never broaden to .* while normal browser
activity is open.
5. Capture embedded resources versus model them deliberately
The Recorder can store browser resource requests, and HTTP samplers can later retrieve embedded resources. Neither approach automatically reproduces a real browser's rendering/JavaScript/network scheduler.
If the test objective is backend business/API capacity, exclude CSS/JS/images. If static-resource/CDN delivery is explicitly in scope, model it as a separate workload with its own target domains, authorization, concurrency assumptions, and metrics.
6. Browser profile isolation versus normal profile
| Disposable Firefox profile | Normal browser profile |
|---|---|
| Empty cookies/history/extensions/accounts. | May contain live credentials, cookies, sync, extensions. |
| Recorder CA trust can be profile-local and deleted with profile. | Certificate import may affect long-lived or system trust. |
| Easy evidence: profile path + deletion checklist. | Hard to prove no unrelated traffic was proxied. |
| Recommended mandatory path. | Rejected for this chapter. |
7. Record once, preserve raw, refactor repeatedly
After a successful bounded capture, save the raw JMX and make it immutable/read-only or checksum it. Refactor a copy. When the application changes, compare the changed endpoint/contract first; do not reflexively re-record the entire browser session and overwrite all review history.
A new recording is justified when the request discovery itself materially changed. Even then, preserve the previous raw and cleaned plans for diff/review.
8. HTTP Request Defaults and UDV replacement
Recorder can recognize HTTP Request Defaults and User Defined Variables in the target-controller ancestry and avoid repeating/rewrite matching values. This can reduce cleanup when prepared carefully.
But broad replacement patterns can corrupt data; current
documentation warns about case-sensitive and overlapping matches.
Keep recorder-side UDV replacement simple, inspect
jmeter.log for pattern errors, and do final refactoring
explicitly.
9. Browser headers: preserve only protocol requirements
Recorded browser headers may include cache validators, user-agent details, fetch metadata, or authentication. Do not keep them by default. Preserve headers only when the server contract or workload question requires them.
Authorization values and session cookies deserve special handling: use authorized synthetic credentials/data sources/managers, never hard-coded captured values.
10. Redirect recording versus replay
Browsers follow redirects and generate a subsequent request, so the recorder may see both. JMeter attempts to detect recorded redirect chains and may disable the generated redirect sampler when Follow Redirects replay would otherwise duplicate it.
Inspect the raw tree/comments rather than assuming every consecutive recorded URL must remain enabled.
11. Recorder grouping versus business transactions
Recorder grouping can place closely timed request groups into Simple/Transaction Controllers, but timing proximity is not the same as business transaction semantics. After capture, rename and regroup requests based on the actual journey from Chapter 12.
12. Secret/private-data minimization
Recording captures request parameters/headers as seen by the proxy. Treat raw JMX as sensitive until reviewed. Store it only in the lab workspace, scan it, and do not commit raw recordings containing real tokens, cookies, passwords, personal data, or unrelated hostnames.
13. Recorder is GUI authoring state; CI gets cleaned JMX
Do not run the recorder in CI merely because the final test runs there. CI should receive a reviewed JMX with variables/properties/data files and execute non-GUI. Browser proxy configuration and recorder CA trust do not belong in the normal performance pipeline.
14. Generator cost and validity
Recording-time listeners, browser traffic, and GUI are authoring tools. Meaningful load must use CLI with lean result capture. Embedded-resource retrieval, parsing, correlation extractors, cookie state, and assertions all consume generator resources; record generator utilization before making capacity claims.
Every executable comparison in this lesson remains on
https://localhost:8443 (or the preliminary
http://localhost:8080 proxy check). Preserve the raw
JTL together with its matching jmeter.log, the exact
cleaned JMX, recorder filter configuration, and independent target
events. Those artifacts separate generator/recorder behavior from
target latency and prove that no external host became part of the
workload.
15. Keep configuration layers distinct
| Layer | Examples | Do not confuse with |
|---|---|---|
| Recorder | port, target controller, include/exclude, grouping | Thread Group/arrival workload. |
| Browser | proxy, profile, CA trust | JMeter outbound proxy/runtime trust. |
| JDK/JVM | keytool availability, JMeter Java version | OS certificate store changes. |
| OS/network | port 8888 availability, firewall | Recorder URL filter semantics. |
| SUT | TLS endpoint, form/session behavior | Captured browser timing. |
| CI/container | clean JMX execution/artifacts | Interactive recorder/certificate import. |
16. Decision table
| Situation | Recommended approach | Evidence/reason |
|---|---|---|
| Well-documented small REST API | Build manually | Less noise/trust; direct contract mapping. |
| Legacy web flow with unknown form/redirect calls | One isolated recorder bootstrap | Accelerates discovery; refactor afterward. |
| Need only proxy/filter proof | Record HTTP local fixture first | Avoid certificate variable. |
| Need real HTTPS request discovery | Disposable Firefox + profile-local JMeter CA | Contains trust impact. |
| Backend capacity test | Exclude static/browser assets | Business calls define target workload. |
| Static/CDN performance explicitly required | Separate resource workload | Different concurrency/targets/metrics. |
| App changes one endpoint | Diff/repair cleaned plan first | Preserves reviewed structure and history. |
Knowledge check
When is manual construction usually better than recording?
When the endpoint/API contract is already known and small enough to build directly without browser-noise discovery.
Why isn't recorder grouping automatically a business transaction?
It groups by recording-time request proximity/settings, not necessarily by the application's business semantics.
Why should raw recordings be preserved rather than overwritten?
They provide immutable discovery evidence and make cleanup/correlation changes reviewable as a diff.
Why shouldn't recorder CA setup appear in normal CI?
It is interactive authoring trust state; CI should execute the already reviewed, cleaned JMX directly.
What is the safest default when unsure whether a captured third-party resource belongs?
Exclude it from the mandatory workload until the performance objective and authorization explicitly require that target.
Official references and version notes
- Component Reference — HTTP(S) Test Script Recorder — proxy, filtering, recording controller, certificate generation, CA trust, cookies, redirects, and UDV replacement.
- HTTP(S) Test Script Recorder tutorial — current recording-template workflow and browser proxy setup.
- Getting Started — Java/JDK requirement, keytool note for HTTPS recording, GUI/CLI conventions, and JMeter HTTP certificate behavior.
- Properties Reference — recorder and certificate properties such as proxy.cert.validity, proxy.ssl.protocol, proxy.pause, and redirect handling.
- Best Practices — using the recorder for rough drafts, variable replacement, and checking proxy routing.
- Apache JMeter downloads — current stable release and Java requirement.
Version-sensitive statements were rechecked against current Apache
JMeter primary documentation on 2026-09-05. The course baseline
remains Apache JMeter 5.6.3 with a Java 17 JDK
and no third-party JMeter plugins; JMeter 5.6.3 requires Java 8+.
A JDK is preferred here because HTTPS recording needs the
keytool utility. HTTP(S) Test Script Recorder is a
local HTTP/HTTPS proxy, default port 8888.
Include/Exclude patterns are regular expressions evaluated against
the full host/port/path/query string; requests still pass through
the proxy even when a filter prevents them from being stored. With
Java 8+ dynamic certificate mode, JMeter generates per-host
certificates signed by its temporary root CA; the default recorder
certificate validity is 7 days via
proxy.cert.validity. The exported
ApacheJMeterTemporaryRootCA.crt is created when
recorder certificates are generated and must be removed from
browser trust after use. Anyone who can access the recorder
keystore/private-key material while a browser trusts that CA has a
powerful interception capability, so the mandatory lab imports it
only into a disposable Firefox profile. During recording, the
browser manages cookies; the cleaned JMeter replay plan needs an
HTTP Cookie Manager. JMeter's HTTP samplers accept server
certificates broadly for test flexibility, so the synthetic
localhost target can use its own short-lived self-signed fixture
certificate without importing that target certificate into the
browser or OS trust store.
Keep the academy open
Support free, practical DevOps education.
Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0
Send only Ethereum/ERC-20 compatible assets to this
address.