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.
We'll cover the following...
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:
We create a new collection, which is simply a folder to store a group of related API requests that we can execute repeatedly.
Next, we create a new request. We set the method type as
POST
and set the request URL ashttp://localhost:5000/send
.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.
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.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 ...