-
Notifications
You must be signed in to change notification settings - Fork 489
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
Headers in default Playwright config values are not being reflected in Artillery performance tests #2593
Comments
Hi @sruthii38, the Can you please share your |
@bernardobridge Hi, the extraHTTPHeaders is working for initial URL load but the user on our website will get redirected by generating 302 status and authorize through headers but the default headers specified in Playwright are not being picked by artillery(Spec file in playwright is doing expected). So here are two problems
To give you more context on the issue I found, the header that is not getting passed to redirect URL is "User-Agent". I can see it is still being the default on redirect URL when extraHTTPHeaders is passing a custom value. On the other hand Playwright spec file is passing the right header(User-Agent) for the entire test and passing the test. But Artillery run is failing. If I add userAgent header to extraHTTPHeaders along with User-Agent like below, the website is getting both headers while User-Agent is still default and userAgent is the custom value but we only need User-Agent for authorization. playwright: yml: Can you please help me if there is a work around for this scenario |
I have default headers that are configured in playwright.config.ts and it worked when running playwright test. When I call the same playwright test through artillery, it is not working.
This default config is specific to header.
I tried specifying config in different sections
config:
engines:
playwright:
contextOptions:
extraHTTPHeaders:
User-Agent: '****'
I have also tried setting at artillery default as well
config:
http:
defaults:
headers:
User-Agent: "*****"
None of these options worked.
Can you suggest a way to make this work?
The text was updated successfully, but these errors were encountered: