Comments (2)
Hi @sruthii38, the extraHTTPHeaders
option should work (but not the config.http
option).
Can you please share your config
+ scenario
using Github Code Blocks? Without the proper formatting it's difficult to say what might be wrong.
from artillery.
@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
-
The headers that Playwright passes from Playwright.config.ts to spec file execution are not being entirely honored by artillery(Spec file passes on Playwright test spec.js)
-
The user have to specify the same headers in Playwright again in Artillery yml file as extraHTTPHeaders but still the test fails because Artillery is not carrying the extraHTTPHeaders to redirect Urls and the tests are failing.
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:
userAgent: '***'
yml:
extraHTTPHeaders:
User-Agent: ''
userAgent: ''
Can you please help me if there is a work around for this scenario
from artillery.
Related Issues (20)
- "histogram" event is not being triggered when using an event listener in plugin HOT 1
- YAML errors out when using before and after scenario hooks in YAML HOT 4
- We need the total of Failed users per phase HOT 1
- artillery-engine-processor could not be loaded
- Cannot find module 'artillery-engine-processor' HOT 3
- Error: Cookie not in this host's domain. Cookie
- errors.Cannot read properties of undefined (reading '0') HOT 9
- Example custom plugin does not work when adding a processor function HOT 5
- Using token generated from config.yml in scenarios/file1.yml
- ARTILLERY_CLOUD_API_KEY has no effect in .env file HOT 3
- Issues with playwright engine and target url as baseURL HOT 5
- Character limit of `--dotenv` in `run-fargate`
- Cannot find module run-fargate.js on a Multiple Scenario specs.
- InvalidParameterValueException: Unzipped size must be smaller than 262144000 bytes with artillery lambda HOT 5
- How to generate a HTML report HOT 1
- Mock data update while running the config.yml file
- Playwright storagestage filename from payload fields HOT 2
- load data from CSV HOT 4
- Getting triggerUncaughtException for artillery 2.0.9 with Node 18.17.0 on Windows
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 artillery.