When the test does not respond to a Stop/Terminate command, it can be stopped by terminating the sessions that haven't yet stopped and which probably won't stop by themselves anymore.
This can be accomplished by following curl command:
curl -X POST https://a.blazemeter.com/api/v4/sessions/<sessionID>/terminate -H "Content-Type: application/json" --user 'ID:Secret'
<sessionID> designates the sessionID
ID:Secret designates the API key and Secret API key as explained in this article
If a test has many sessions, it may not be easy to manually check which sessions refuse to stop.
To find out the problem sessions that need to be terminated using the above listed curl command, run following command:
curl -X GET https://a.blazemeter.com/api/v4/masters/<masterID>/sessions -H "Content-Type: application/json" --user 'ID:Secret'
where masterID designates the master to be stopped.
Then check all sessions in the output and find out which ones do not have a status equal to "ENDED". Those need to be terminated.