Skip to main content
2 of 4
deleted 125 characters in body

While loop does not exit

I want to let jmeter exit while controller when response value "model_name": "Model-Test-2022-02-24T04:34:32454-0001-v1-8k" is found in response data.

sample response data:

{
    "message": "success",
    "valid_model_list": [{
            "meta_data": {
                "corpus_list": [
                    "test1"
                ],
                "id": "1",
                "sample_rate": 16000,
                "test_duration": "0.17 hrs"
            },
            "model_name": "Model-Test-2022-02-24T04:34:32454-0001-v1-8k",
            "status": "ok"
        },
        {
            "meta_data": {
                "corpus_list": [
                    "test1"
                ],
                "id": "2",
                "sample_rate": 16000,
                "test_duration": "0.17 hrs"
            },
            "model_name": "testmod2-v1-8k",
            "status": "ok"
        }
    ]
}

I have set followings:

  1. user defined variable modelnameresult = Model-Test-${variable}-0001-v1-8k (the ${variable} was set in previous request Test-${__time(yyyy-MM-dd'T'hh:mm:ssSSS,variable)}-${counter}

  2. while controller condition ${__jexl3("${model_name}" != "${modelnameresult}",)}

The JSON expression is tested works to extract a list of "model_name".

however, the GET request isn't exiting when the response value is already there.

enter image description here enter image description here

enter image description here

enter image description here