![]() ![]() Configure the HTTP Request Sampler to send a request to the Library.Authentication service. More details about what a JSON Web Token is can be found on. Since the book search and order services are protected by JWT, we need to request a valid security token from the Library.Authentication service. Now, add an HTTP Request sampler to the newly created Thread Group. Since the mentioned services are HTTP based RESTful services, we need the HTTP Request Sampler to perform the service call.Ģ. Run the same command for all 3 services and we are ready to go! The dotnet run result should be something similar to this: Those who are interested in more information about the dotnet cli tool can find more details here. After cloning the project locally, open the project folders in a command line tool and run dotnet run to start the corresponding service. The Library project contains three services. Net Core official website if you don't have it already. The services that are used in the current tutorial can be found on the GitHub repository called Library (I didn't try to be creative here). We are not going to do anything complicated here anyway and the scripts used below are very easy to read. Don't feel upset if you are not familiar with Groovy. Since we are going to use Groovy in this article, a very basic knowledge of it would be nice to have. For simplicity's sake, all the information about books is hardcoded so no DB of any sort will be used. We will create a simple JMeter test project for the set of microservices mentioned above that will test the group of services in the same thread. These are microservices because they are small, loosely coupled, scalable and each solves its own problem. The first one is responsible for user authentication, the second one acts as a bookshelf service helping to find information about books, and the last one allows ordering books. Let's imagine we have a group of services. A load testing scenario for microservices should test the interactions between these services. In this post, we will demonstrate one of the possible scenarios of testing Microservices with Apache JMeter™. ![]() The advantages of microservices have resulted in more users and growing popularity, but at the same time the challenges of developing and testing Microservices surface. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |