Comments (3)
Hmm... I think what you want is just to wrap the calls in a subclass. See the subclasses at the end of this file for example:
Line 78 in 63bfdc7
from locust.
Thank you. This surely helps with fasthttpuser class. Would there be equivalent way to
Wrap HttpUser class. I am having hard time figuring out which method can be used on the class tho pass in additional headers.
from locust.
If you just want to set default headers in HttpUser, you can try self.client.headers = {'user-agent': 'Mozilla/5.0 ...'}
(havent tested it myself)
from locust.
Related Issues (20)
- [ModernUI] HTML entities are incorrectly escaped in generated report
- Getting "NameError: name 'open' is not defined" error while running Locust test scenarios HOT 5
- Locust stops sending requests (boto3 / sqs) HOT 11
- The run_single_user mode doesn't fire some of the events
- Locust --processes argument generating multiple html reports HOT 4
- `'NoneType' object has no attribute 'get'` when `stream=True` in `FastHttpSession.request` HOT 2
- Add an UI extension exemple that display proxy cache hit/miss
- Integrating with Locust HOT 3
- Locust tasks block when executing queries with pyodbc, but not in ThreadPool
- Use `random.choices` when selecting a task instead of `random.choice` HOT 1
- Users can raise `RescheduleTask` but TaskSets cannot? HOT 1
- TaskSet's `_task_queue` should be a `collections.deque`? HOT 1
- cannot specify task of UserClass when locust run on distributed mode HOT 5
- How to handle API calls in a row in Locust ? HOT 2
- Monkey patching error HOT 3
- Wrong distribution of virtual users by user classes HOT 5
- Running two services test with different volume to be run in parallel HOT 3
- Abnormal Response Time Percentiles Reported After a Load Increase HOT 3
- Custom Threshold Rules HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locust.