Warm tip: This article is reproduced from stackoverflow.com, please click
bearer-token token jmeter

Trouble correlating a bearer token while trying to performance test an application in Microsoft Powe

发布于 2020-03-29 21:00:09

I am trying to perform some performance tests on a simple app I have developed in PowerApps using JMeter as a learning exercise. After importing the .Har file of the process I want to test to JMeter, I am presented by many Http requests. During a replay of the script The first few Http requests fail due to the following error;

HTTP Error 400. The request has an invalid header name

In the request body it contains a Bearer token. I am assuming the issue is that I need to correlate this token. The token is a cookie and also exists within the cookie manager. My problem is I cannot find the value in a response to correlate it. Am I assuming right in that my issue lies with the Bearer token and if so what would be the best course of action to try identify the Bearer token from a response. If not what am I doing wrong and could someone point me in the right direction.

Any additional information can be provided that is relevant to my question.

Questioner
platune
Viewed
58
Dmitri T 2020-02-03 18:05

Looking into the error:

The request has an invalid header name

it seems that your HTTP Header Manager configuration is not correct, to wit there is a typo in the header name

Just make sure that you have a Authorization header with the value of Bearer <your token here> like:

enter image description here