6.1 单事务

一个脚本如果只包含一个接口请求,直接定义一个request并在call方法里面进行接口请求即可。示例如下:

def call(self):

result1 = request1.GET("http://waf-demo.qa.web.sdp.101.com/benchmark/blank")

if result1.getText().find("age") != -1 :

  grinder.statistics.forLastTest.success = 1

else :

  grinder.statistics.forLastTest.success = 0

results matching ""

    No results matching ""