jmeter can execute Jython: python lines of code
1, download the Jython jar package: http://www.jython.org/downloads.html
2, to download the Jython jar package into jmeter lib folder. Restart jmeter
3, thread group Add JSR223 Sampler
4, provided JSR223 Sampler
python code
5 is performed, and since the code mark 502 fails, execution results are as follows