Member-only story
Trick how to separate Locust for Admin and Viewer
Locust is Open-source Python-based load testing. All you need is to write a script using locust library. Its very simple and easy-to-use which for me as python beginner easier to understand. For more info, you can read here.
Locust currently only support admin view which the page with input like below
When it goes to public or internal network and you want to show to your colleagues or clients, you might want to prevent them from tampering the input from their side. For example, if spectators open the IP/URL for the locust, they will see like below
Okay, here’s the trick.
- Custom locust path
- Adjust Nginx for Reverse Proxy
Custom Locust Path
Create a static
folder at the root directory and create file named as extend.js
. Add this code in it
$('#swarm_form,#edit,#new_test,#box_stop,.edit_test').remove()…