Login & Create a blog post
POSTand its URL to -
application/x-www-form-urlencoded(last in the list).
JSONPathextractor 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
JSONPathextractor by expanding the ‘Verify Response’ card of the request and creating an assertion. Add an assertion that states that the
Is True(Use the "Exists" assertion type).
access_tokenwe can use it to publish on our blog
Publish Blog Post
application/jsonand the body to this JSON-
__random_charsparameter will change to 10 random characters during test/trial execution.
access_tokenparameter 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
Authorizationand the value
https://loadmill-test-blog.herokuapp.com/to see that our blog posts are getting published.