我很好

还未发布过话题
  • 如果我在校验器里加入函数(从数据库里面取值 ${lift_check_attributes_goto_db('$sn')})怎么处理?下面的代码,函数 lift_check_attributes_goto_db('$sn') 取不到 MYSQL 数据库的值

    • test: name: 校验上传 api: api/vvvvv.yml variables:
      • sn: ${lift_get_radom_time_string()}
      • value: ${lift_check_attributes_goto_db('$sn')} validate:
      • {"check": "status_code", "comparator": "eq", "expect": 200}
      • {"check": "content.success", "comparator": "eq", "expect": 0}
      • {"check": "$value", "comparator": "eq", "expect": "$sn"}

    报错如下:
    AssertionError: validate: $value equals gongyoulift2019040817423338(str) ==> fail
    ${lift_check_attributes_goto_db('gongyoulift2019040817423338')}(str) equals gongyoulift2019040817423338(str)

我很好