I get this JSON response from my web service:
[
{
"type": "022",
"sendDate": "2020-11-09 12:43:07",
"message": "test1",
"id": 8035,
},
{
"notificationType": "023",
"sendDate": "2020-11-09 11:40:02",
"message": "test2 ",
"id": 8034,
},...
]
Now by Beanshell in JMeter i want to pass first id
into new request so in JSR223 PostProcessor i write a simple print like this:
import com.eclipsesource.json.*;
String jsonString = prev.getResponseDataAsString();
print("value "+ jsonString);
but when i run my rest test i got this :
Where is my print value?I expect to see my result on JMeter log viewer
System.out
will print to console, if you want to print to JMeter's log use log variable
log.info("value=" + jsonString);
log - (Logger) - can be used to write to the log file
(Log viewer display jmeter.log)