Exemplo n.º 1
0
 def findCaseById(self, case_id):
     """
     根据id找测试用例
     :param case_id:
     :return:
     """
     print("findCaseById")
     my_db = MysqlDb()
     sql = "select * from `case` where id='{0}'".format(case_id)
     results = my_db.query(sql, state="one")
     return results
Exemplo n.º 2
0
 def loadAllCaseByApp(self, app):
     """
     根据app加载全部测试用例
     :param app:
     :return:
     """
     print("loadAllCaseByApp")
     my_db = MysqlDb()
     sql = "select * from `case` where app='{0}'".format(app)
     results = my_db.query(sql)
     return results
Exemplo n.º 3
0
 def loadConfigByAppAndKey(self, app, key):
     """
     根据app和key加载配置
     :param app:
     :param key:
     :return:
     """
     print("loadConfigByAppAndKey")
     my_db = MysqlDb()
     sql = "select * from `config` where app='{0}' and dict_key='{1}'".format(app, key)
     results = my_db.query(sql, state="one")
     return results
Exemplo n.º 4
0
 def loadConfigByAppAndKey(self, app, key):
     my_db = MysqlDb()
     sql = "select * from `config` where app='{0}' and dict_key='{1}'".format(
         app, key)
     results = my_db.query(sql, state="one")
     return results
Exemplo n.º 5
0
 def findCaseById(self, case_id):
     my_db = MysqlDb()
     sql = "select * from `case` where id='{0}'".format(case_id)
     results = my_db.query(sql, state="one")
     return results
Exemplo n.º 6
0
 def loadAllCaseByApp(self, app):
     my_db = MysqlDb()
     sql = "select * from `case` where app='{0}'".format(app)
     results = my_db.query(sql)
     return results