Skip to content

Platform-agnostic HAR import intelligence (smart filtering & analysis) #88

@davidcampbelldc

Description

@davidcampbelldc

Summary

Add server-side intelligence to HAR import that works across ANY web platform without per-platform maintenance. Currently filtering is purely URL-regex based — we need content-aware, pattern-aware analysis.

Background

Salesforce POC (#86) revealed that HAR import needs smarter filtering, but maintaining per-platform rules doesn't scale. Most platform-specific problems are actually generic anti-patterns.

Proposed Heuristics (all server-side, platform-agnostic)

1. Content-type based filtering

Replace URL-regex filtering with MIME-type filtering as the primary mechanism:

  • text/css, application/javascript, image/*, font/* → auto-exclude
  • Works regardless of URL structure, CDN domain, or path convention
  • URL-regex remains as supplementary user override

2. Structured data in URL detection

Flag any URL containing unencoded {, [, or JSON-like structures in path segments:

  • Salesforce: /l/{"mode":"PROD",...}/app.css
  • Any SPA framework that embeds config in URLs
  • Recommend: exclude, URL-encode, or parameterise

3. Token fingerprinting

Automatically identify likely dynamic tokens by analysing:

  • Entropy — high-entropy strings are likely tokens
  • Length — unusually long values warrant attention
  • Appearance pattern — value appears in response then in subsequent request = correlation candidate
  • Format — GUID, JWT, base64, hex patterns

4. Endpoint consolidation

Detect when the same URL is called N times with different POST bodies:

  • Salesforce /aura batching, GraphQL endpoints, REST APIs
  • Recommend grouping rather than N sequential samplers

5. Client-assembled value detection

Flag request values that cannot be found in ANY prior response:

  • Indicates value is built client-side by JavaScript
  • Recommend alternative strategy: static config, JSR223 script, template-based assembly

6. Response-to-request value linking ("correlation preview")

At import time, scan for values flowing from responses into subsequent requests:

  • Provides a preview of what will need correlation before test execution
  • Helps users understand test plan complexity upfront

Integration

  • All logic lives in har-service (app.py or new module)
  • Called during HAR upload/processing
  • Returns analysis results alongside the processed HAR
  • George can reference results during test plan generation
  • Locust editor and JMeter plugin both consume the same server analysis

Dynamic KB Extension (Layer 2)

When heuristics flag something unusual, George consults loadmagic-kb for platform-specific guidance. KB grows from:

  • Successful user test runs (patterns that worked)
  • Curated platform guides (Salesforce, ServiceNow, SAP, etc.)
  • Community knowledge articles

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions