Save the local variable to global variable to use between threads and also automatically convert to HTML report
- Download latest jmeter apache file with jdk file (set java home file in environment system variables)
- open jmeter by bin jmeter.bat folder
- In testplan(projectname) add http request default to setup proxy → advanced →IP:localhost: port number:3128
4. under testplan create required auth post APIS in setup thread group
5. under each post call, add json extractor give variabe name (same use it for global reference as ‘$.access_token’) to save to local variable and beanshell postprocessor to save variable to gobal variable ${__setProperty(orgTokenId,${orgToken})} and this is way to interact with different thread group
6. To generate a automatic html reporter, first directly add simple data writer to test plan by giving file loaction to save csv file as ‘C:\Users\SRINIKP\Downloads\apache-jmeter-5.2.1\apache-jmeter-5.2.1\result.csv’ and it save by default afterwards,
7. Add teardown thread group to finally conver csv file to html report folder by default through beanshell sampler and writing jmeter CLI command to convert as html folder ‘Runtime.getRuntime().exec(
“C:/Windows/System32/cmd.exe /c jmeter -g C:/Users/SRINIKP/Downloads/apache-jmeter-5.2.1/apache-jmeter-5.2.1/result.csv -o C:/Users/SRINIKP/Downloads/apache-jmeter-5.2.1/apache-jmeter-5.2.1/report”);’