JMeter获取JSON内容

JMeter获取JSON内容

1 source("D:\\apache-jmeter-3.0\\用例\\Test.java");
2 public static void f(){
3     String response_data=prev.getResponseDataAsString();
4     String JsonPath="$.data.groupList[0].dateList";
5     String result=Test.readjson(response_data,JsonPath);//调用方法时语句要在方法体内,不能直接写语句,否则报错。
6     log.info("---------------"+result+"---------------");
7 }
8 f();
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-08
  • 2022-12-23
  • 2021-07-24
  • 2021-12-24
  • 2022-01-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-11-17
  • 2021-11-13
  • 2022-12-23
相关资源
相似解决方案