Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing different request Headers per each request from an external file #15

Open
gunayus opened this issue Jan 30, 2020 · 2 comments
Open
Labels
feature-request New feature or request

Comments

@gunayus
Copy link

gunayus commented Jan 30, 2020

Is it possible to pass different (random) request Headers per each http request from an external file? if not, would you like to add this feature?

my use case is following, I would like to load test my application but for different user accounts in order to eliminate non-realistic cache hits. my app expects 'Authorization' request header to identify the end user.

@rogerwelin rogerwelin added the feature-request New feature or request label Feb 3, 2020
@rogerwelin
Copy link
Owner

rogerwelin commented Feb 4, 2020

Hi @gunayus! Thanks for the interesting in the project and sorry about the late reply.

Regarding this feature, would it suffice with adding a new flag (that could be called --randomize-header for example) that would generate a random string for the header key that you define for each requests? Or is there a reason you want to define the headers in a file?

I think of the following way it could be implement in from a cli point of view:

$ ./cassowary run -u https://www.example.com -c 10 -n 1000 --randomize-header Authorization

Here cassowary would generate a random value for the Authorization header key for each request. Would this satisfy your requirement?

@gunayus
Copy link
Author

gunayus commented Feb 4, 2020

thank you @rogerwelin for the reply. I don't think randomized Authorization header would help because the application would return 401 for each request.

That's why I should be able to provide valid header values from a file, then, cassowary can randomly select any of the provided headers,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants