0

I try to Benchmark Node.js Ghost with JMeter. I want to create a testplan which just signs in and then creates and publishes a post.

My problem now is that i do not get any session-cookies. So every request on the backend fails. I already tried to change the CookieManager settings within the user.properties file.

i tried following configuration:

CookieManager.check.cookies=false
CookieManager.delete_null_cookies=false
CookieManager.save.cookies=true
jmeter.save.saveservice.url=true
jmeter.save.saveservice.requestHeaders=true

This is the results tree (on the left side you can see my testplan setup):

enter image description here

warch
  • 2,387
  • 2
  • 26
  • 43

1 Answers1

1

I don't think Ghost uses cookies at all, the errors you're seeing are likely due to failed login.

Looking into response to the first request:

GHost response

It seems Ghost uses OAuth authentication.

So you need to do the following:

  1. Extract this access_token value from the /ghost/api/v0.1/authentication/token request response. You can do it using JSON Path PostProcessor like

    JSON Path PostPRocessor

  2. Configure HTTP Header Manager for next requests to send Authorization header with the value of Bearer ${access_token}

    HTTP Header Manager

The whole process of getting dynamic content from previous request, converting it to JMeter Variable and adding as a parameter to next request is known as correlation.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133