(总结)JMeter JSon Path Assertion

例如,1.10.2获取我的日记血压数据列表hcGetDiartPresureList,添加JSon Path Assertion,JSON Path输入如$.result.diaryList[*].recordItems[*].diaryId, 

其中*表示全部,则是表示返回结果集中所有的diaryId值,["9333","9295","9293","9288","9286","9278","9281","9272","9274","9262"]。 

$.result.diaryList[*].recordItems[0].diaryId,返回结果集中所有diaryList中recordItems第1个diaryId,["9333","9295"]。 

$.result.diaryList[*].recordItems[0,1].diaryId,返回结果集中所有diaryList中recordItems第1、2个diaryId。 

Expected Value表示预期结果。 

JOBC Connection Configuration 
BeanShell 
BeanShell Postprocessor 
p@gc - JSON Path Assertio 
Thread Group 
Request 
jp@gc - JSON Path Extractor 
jp@gc - JSON Path Extractor 
Debug Sampler 
View Results Tree 
jp@gc - JSON Path Assertion 
Name: jp@gc - JSON Path Assertion 
Comments: 
O Help on this plugin 
JSON Path: 
@Validate against expected value 
@ Match as regular expression 
Expected Value: 
C] Expect null 
C] Invert assertion (will fail if above conditions met)
XPath 
Istore/book!author 
Ifauthor 
{store'* 
Istore//price 
J','book13] 
ffbook[isbnl 
JSONPath 
S. -author 
S. store. * 
S. store..price 
S.. book[2] 
$..book[-l:] 
Result 
the authors of all books in the store 
all authors 
all things in store, which are some books 
and a red bicycle. 
the price of everything in the store. 
the third book 
the last book in order. 
the first two books 
filter all books with isbn number 
filter all books cheaper than 10 
all Elements in XML document. All 
members of 'SON structure.

 

posted @ 2017-11-28 11:44  春田花花同学会  阅读(191)  评论(0编辑  收藏  举报