Groups
Sign in
Groups
JMeter Forum
Conversations
About
Send feedback
Help
tests with token authentication
18 views
Skip to first unread message
Jose Miguel liriano
unread,
Jun 26, 2024, 12:14:52 PM (9 days ago)
Jun 26
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JMeter Forum
hello;
I am trying to test an API that must first be authenticated so that a token is returned and with that token the API services are tested.
please help me.
DT
unread,
Jun 27, 2024, 2:58:55 AM (8 days ago)
Jun 27
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to JMeter Forum
So you need to authenticate first like
Send a request (or several, depending on your authentication/authorization) setup using
HTTP Request
sampler
Extract the token from the response using a suitable
Post-Processor
and save it into a JMeter variable
Use
HTTP Header Manager
to add the token to the subsequent requests which need authentication
See
JMeter Regular Expression Extractor: How to Extract Tokens and Session IDs to Variables
article for more details.
Reply all
Reply to author
Forward
0 new messages