def findCaseById(self,case_id): """ 根据id找测试用例 """ print("findCaseById") my_db = MysqlDb() sql = "select * from `testcaseapp_case` where id = '{0}'".format(case_id) returns = my_db.query(sql, state="one") return returns
def loadConfigByAppAndKey(self,app_name,dict_key): """ 根据app和key加载配置 """ print("loadConfigByAppAndKey") my_db = MysqlDb() sql = "select * from `testcaseapp_config` where name='{0}' and dict_key='{1}'".format(app_name,dict_key) returns = my_db.query(sql, state="one") return returns
def loadAllClassByApp(self,app_name_id): """ 根据app加载全部用例 """ print("loadAllClassByApp") my_db = MysqlDb() sql = "select * from `testcaseapp_case` where app_name_id = '{0}'".format(app_name_id) results = my_db.query(sql) return results