Weaving real traffic into performance tests
Convert browser HAR (HTTP Archive) traffic into structured load-testing scripts for multiple performance testing tools.
- HAR Parsing: Extract and structure HTTP requests from browser recordings
- Behavior Modeling: Detect sequential blocks, parallel execution, and transaction boundaries
- Correlation Engine: Auto-detect and extract dynamic values (tokens, session IDs, etc.)
- Smart Parameterization: Replace environment-specific values with configurable variables
- Think-Time Modeling: Simulate realistic user pacing based on HAR timestamps
- Multi-Tool Support: Generate scripts for:
- Apache JMeter
- k6
- Gatling
- Locust
- Playwright (API load mode)
The system uses a layered architecture to ensure extensibility:
HAR Input
↓
HAR Parsing Engine
↓
Behavior Modeling Engine
↓
Correlation Engine
↓
Parameterization Engine
↓
Tool Adapters
↓
Generated Load Test Scripts
Install from npm:
npm install perfweaverYou can also use it via npx without installation:
npx perfweaver analyze example.harFor development:
git clone https://github.com/ashwin-ak/perfweaver.git
cd perfweaver
npm install
npm run buildOr for development:
git clone <repo>
cd perfweaver
npm install
npm run buildperfweaver generate --tool jmeter --har login.har --output login.jmxperfweaver generate --tool k6 --har checkout.har --output checkout.jsperfweaver analyze login.harperfweaver visualize login.har --output report.htmlCreate a perfweaver.config.yaml in your project root:
filters:
ignoreExtensions:
- png
- jpg
- gif
- css
- woff
- woff2
- ttf
- svg
ignoreResourceTypes:
- image
- stylesheet
- font
- media
parallelDetection:
overlapThresholdMs: 40
correlation:
enableAutoCorrelation: true
extractors:
- type: json
- type: regex
- type: xpath
parameterization:
envVars:
- BASE_URL
- AUTH_TOKEN
- USER_ID
loadModel:
threadCount: 10
rampUpTime: 60
duration: 300
iterations: 1
tools:
enabled:
- jmeter
- k6
- gatling- core/har-parser: Parse and extract HAR data
- core/behavior-model: Detect transactions and request relationships
- core/correlation-engine: Auto-detect dynamic values
- core/parameterization: Replace values with variables
- core/think-time: Model user pacing
- core/load-model: Configure load profiles
- adapters/: Tool-specific script generators
- cli/: Command-line interface
- tests/: Unit and integration tests
See the examples directory for sample HAR files and generated scripts.
Complete user and developer guides are available in the docs/ folder:
Contributions are welcome! Please follow the coding standards and add tests for new features.
MIT
Ashwin Kulkarni

