![]() Start with the most simple one: the users’ listing at Figure 7 shows how to add a new HTTP Request Sampler element.įigure 7. Now that you have a default configuration for your HTTP requests, move on to add the first API endpoint to test. It stacks things in a nested way in order to keep the hierarchy of your settings, so pay attention to that. You may also notice that these configs are being stacked on top of each other on the left panel of the JMeter GUI tool. Go ahead and fill in the options as shown in Figure 6.įigure 6. This is a great option when you have to test many API endpoints within the same Thread Group without having to explicitly duplicate the information. This option helps you globally configure HTTP properties that are most commonly used such as the URL root address of your API, HTTP Authentication settings, IP, port, etc. Figure 5 shows how to access this option.įigure 5. However, since you’re dealing with a REST API, the HTTP requests are the next elements to configure.īut first, take a shortcut through a very nice config called HTTP Request Defaults. You can iterate over many different types of requests, such as JDBC, JMS, FTP, etc. Great! Now that you have your Thread Group set up, you need to determine what this group will iterate over. Configuring the Thread Properties of your Thread Group Loop count: how many iterations this thread group test may have?įigure 4.Ramp-up period (seconds): this field considers a ramp-up strategy over time which tells JMeter how long to wait until loading the next user (request).Usually, you’re going to add a value way higher than the average of concurrent users you have in order to stress your system. ![]() Number of threads (users): as the name suggests, this field represents how many users you envision to be using the same endpoint at the same time.Among all these fields, there are three of them that are more important: You may see a bunch of fields under the Thread Properties section. Adding a new Thread Group to your Test Plan ![]() Figure 3 demonstrates the menus you may access to add a Thread Group.įigure 3. That’s why you always start by adding a new Thread Group to your Test Plan. Loops are used to check if the given resource can handle all the concurrent load that you’d eventually have in a real-world scenario. Typically, since you’re dealing with stress testing, you have to deal with loops. You can have as many test plans as you want for a single project. That’s the very definition of how JMeter groups things together as a composition of runnable tests. In JMeter, everything starts from a Test Plan. This command will start up the application at Leave it there and get back to the tests. Please, clone it to your machine, cd into the \ReactASPNET\ReactASPCrud\ReactASPCrud\ folder, and run the following command: However, to get the feeling of local tests, use a CRUD API I’ve developed before in another article: Creating ASP.NET Apps with React. You can test whatever web application or live API on the web that you have handy. NET applicationįor simplicity, this example will not create an API application from scratch since it’s not the focus of the article. Take some time to look at the options and menus displayed on this screen. The GUI tool is going to load in the background until it pops up as shown in Figure 2. Double-click it and the window shown in Figure 1 will show up. Unzip it and navigate to the bin folder in which you will find a file called jmeter.bat. Instead, you must go to the JMeter Download page and download the binary zipped file. The installation for JMeter is a little bit different from the usual installer approach. JMeter is made with Java 8 , so it requires the JDK ( Java Developers Kit) on your machine before using it. In this article, you’re going to dive into the universe of Apache JMeter, one of the most used agnostic load test tools in the software development community by testing it against a REST application created in ASP.NET. Most people load testing nowadays are doing that against web APIs or, at least, web applications (that handle endpoints the same way with different media types).īecause of this particular point, these types of tools are mostly agnostic because some of them provide very platform-specific features like the JSR223 (a scripting language for Java apps) assertions that JMeter supplies, for example. NET projects? The answer starts right before the “.NET projects” part. ![]() Users in the community now had to think about the one million-dollar question: What is the best load/stress testing tool for my. NET team has discontinued their cloud-based load testing service a while ago under Visual Studio 2019 due to the lack of community adoption. More specifically, you want to create and run some stress tests for your API in to understand how fast it is and how much load it supports. You created a brand-new API developed on the REST principles and set up under the ASP.NET world. ![]()
0 Comments
Leave a Reply. |