Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

318
Views
JMETER - Variable Header doens't be automated

I'm testing an API, and at some point, one function creates a TOKEN, and I need that token on HEADER for the next function to work. I search and tried everything but without success.

This is my environment
enter image description here

Here, under the POST CREATE MODEL I have:

Bean shell preprocessor
enter image description here

This is for the function Bearer

HTTP manager
enter image description here

This is my HTTP manager, where I need a token.

Here is the big token, it's because have a lot of bytes?
enter image description here

If I put a token manually, work, but I need that automated. And I can't do that. Someone can help this poor QA intern?

Ty guys <3

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You don't need the Beanshell PreProcessor (moreover since JMeter 3.1 it's recommended to use JSR223 Test Elements and Groovy language for scripting), just HTTP Header Manager will be sufficient assuming that your EXTRACTOR Token really extracts the token, check your ${auth_token} variable value using Debug Sampler and View Results Tree listener combination

Just in case here's how I would use JSON Extractor:

enter image description here

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!