login_app.py 613 B

1234567891011121314151617181920
  1. from hytest import *
  2. from lib.webapi import apimgr
  3. class c1:
  4. #测试用例名称
  5. name='app登录接口验证'
  6. #测试步骤
  7. def teststeps(self):
  8. INFO('测试步骤')
  9. STEP(1,'打印接口返回值') #会出现在测试报告中
  10. r = apimgr.mgr_login_app()
  11. res = r.json()
  12. INFO(res)
  13. actural = res['status']
  14. STEP(2,'第二步设置检查点')
  15. #设置检查点
  16. CHECK_POINT('检查app登录接口是否正常',actural == 1)
  17. #清除方法
  18. def teardown(self):
  19. INFO('用户退出app')
  20. apimgr.mgr_logout_app()