Functional Testing 08: Using Response Data – Part 2

Eighth in a series focusing on using JMeter for functional testing of an API.

In the last tutorial we used the response from Signin in to make another call to the API. Now we’ll take it one step further. We’ll introduce a little bit of validation to our Folders Sampler Library module in order to be able to make one more call to get the list of files within a folder. We’ll also introduce a little bit of randomness to our test, in a way that we will improve on in the next tutorial when things really start to get fun.

Continue reading “Functional Testing 08: Using Response Data – Part 2”

Functional Testing 04: Everyone Needs a Little Validation

Fourth in a series focusing on using JMeter for functional testing of an API.

So far we have relied solely on JMeter’s built in ability to tell if our API calls have passed or failed based on the HTTP response code we receive from the server. So a Signin response returning a 200 code would display as a pass (or success) and a 401 code would display as a failure.

This will often not be enough to validate the response from the server was in fact correct. The server could return a good response code but send bad data back which could cause problems down the line. In this tutorial we’ll enhance our Library module for Signin to validate that we are getting a token field in the response. It will be a very simple introduction to some more complicated validation we will do in a later module.

Continue reading “Functional Testing 04: Everyone Needs a Little Validation”