TPC-C inspired benchmark and load testing for ERPNext
- New site with ERPNext installed.
- Grafana K6 - Installation Guide
- Basic understanding of how Frappe, ERPNext, and K6 work.
You can install this app using the bench CLI:
cd $PATH_TO_YOUR_BENCH
bench get-app erpc
bench install-app erpc
We use k6 to generate load. You can read their documentation to get started.
# Setup dummy master data for load testing
bench --site test_site setup-loadtest-data
# Run the load test with 100 virtual concurrent users
k6 run --vus 100 --duration 10m -e BASE_URL=http://sitename:port ./apps/erpc/src/script.js
Note: fixture records have hard-coded naming to simplify writing tests without sending too many arguments. We intend to make it flexible over time if required.
If you want to write custom benchmarks, consider forking the repository or creating a new script. The goal of this project, as of now, is to just provide the boilerplate required for writing such tests.
The following variations are worth exploring in the future:
- Realistic think times. This repo has an aggressive high-throughput API ingestion scenario. If your service will only be used by humans, then you can relax the think times.
- Read heavy workloads. This repo has a disproportionately high W:R ratio. Most sites used by end users directly will have 1:10 write-to-read ratio.
- Different modules and doctypes. Currently, we just do sales invoice -> payment -> Delivery simulation.
- Randomness / Markov modelling on top of end-user traces / complex workflows
We are not accepting direct contributions at this time. You can suggest changes or post queries by creating an issue.
AGPL-3.0