Login & Create a blog post
Blog Login
POST
and its URL to - https://loadmill-test-blog.herokuapp.com/ghost/api/v0.1/authentication/token/
application/x-www-form-urlencoded
(last in the list).grant_type=password&[email protected]&password=Test1234&client_id=ghost-admin&client_secret=b91601629baf
access_token
using a JSONPath
extractor querying for access_token
. This will create a value extractor that will execute a JSONPath query against the JSON response of the request and extract the authentication token into a parameter named access_token
.access_token
by the JSONPath
extractor by expanding the βVerify Responseβ card of the request and creating an assertion. Add an assertion that states that the access_token
parameter Is True
(Use the "Exists" assertion type).access_token
we can use it to publish on our blogPublish Blog Post
POST
request to https://loadmill-test-blog.herokuapp.com/ghost/api/v0.1/posts/
application/json
and the body to this JSON-${__random_chars}
. The __random_chars
parameter will change to 10 random characters during test/trial execution.access_token
parameter value we extracted from the login response to authenticate this request. Expand the header card of publish request and add a header with the name Authorization
and the value Bearer ${access_token}
https://loadmill-test-blog.herokuapp.com/
to see that our blog posts are getting published.