How To: If Controller In JMeter (1 Min) | Logic Controller

Опубликовано: 06 Июнь 2022
на канале: Gokce DB
1,041
5

In this tutorial, you'll learn how to use the if controller in Apache JMeter.


Facebook:   / gokcedbsql  

Video Transcript

Hi guys, this is Abhi from Gokcedb. In this video, you're going to learn how to use the if the controller in Apache J meter. Let's start by adding a thread group and an HTTP request sampler to our test plan. 

Here, I'm going to specify google.com in the server name. Next, add a regular expression extractor and select the response code under field check. For the variable name, I'm going to specify var underscore response underscore code and dot start in parentheses for the regular expression. 

I'm going to specify 1 and 1 for the group number and the match number. Next, let's add an if the controller and specify a condition to check. Here, I'm saying if the var underscore response underscore code is equal equal to 200 then execute whatever is inside the if controller. 

Inside the if controller, I'm going to add another HTTP request to search for the keyword J meter on google.com. Finally, let's add a view results tree listener. Our test setup is now complete. 

Let's click on the green start button to execute our test since the response code on the main HTTP request was 200. Seems like our if controller worked as expected. Watch what happens if I change the response code to 300 from 200 in the if condition. 

This time, when I re-an the test the HTTP request within the if controller did not execute. There you have it. Make sure you like, subscribe, and turn on the notification bell. 

Until next time.


Смотрите видео How To: If Controller In JMeter (1 Min) | Logic Controller онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал Gokce DB 06 Июнь 2022. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 1,041 раз и оно понравилось 5 посетителям.