Testing Against Containers

Discuss basic functionality testing using Postman and load testing using JMeter to ensure the health and scalability of an event-driven application.

This course does not cover a full testing regime across all stages of a DevOps life cycle. However, we’ll walk through the technicalities of performing basic testing to prove the environment is healthy and demonstrate putting a load on the overall application. We want to show the high-scale throughput we can achieve by adopting an event-driven architecture over others.

Functionality testing

If we’re working on our own machine, we can set up a simple test using Postman:

  1. We create a new collection, which is simply a folder to store a group of related API requests that we can execute repeatedly.

  2. Next, we create a new request. We set the method type as POST and set the request URL as http://localhost:5000/send.

  3. We select the “Body” tab, choose “raw” as the format, and enter an event message in the text area. We chose to use the This is a Postman test to our orchestrated environment: text.

Press + to interact
Setting up a simple Postman API request
Setting up a simple Postman API request
  1. We need to make sure the Visual Studio solution is open, and we’re debugging using the docker-compose launch profile from the last section.

  2. We click the “Send” button, and we should see Postman confirm that it received a Status code is 200 response. If we inspect the container logs for ...