def __init__(self, configFilePath): Tester.__LOGGER.debug("created Tester") with open(configFilePath, 'r') as configFile: self.__config = DictUtils.convert(json.load(configFile)) Tester.__LOGGER.debug("loaded config from: " + configFilePath)
response = "" else: isSuccess = True statusCode = res.getcode() response = res.read() endTime = time.time() timeTaken = (endTime - startTime) TestExecutor._LOGGER.info("statusCode: " + str(statusCode)) TestExecutor._LOGGER.info("response: " + str(response)) try: jsonRes = json.loads(response) TestExecutor._LOGGER.debug("jsonRes: " + str(jsonRes)) responseDict = DictUtils.convert(jsonRes) TestExecutor._LOGGER.debug("responseDict: " + str(responseDict)) except ValueError, e: TestExecutor._LOGGER.debug("caught exception e:" + str(e)) responseDict = None except TypeError, e: TestExecutor._LOGGER.debug("caught exception e:" + str(e)) responseDict = None if control['session']['running']: control['session']['steps'].update({sid: {'IN':inputData, 'SC':statusCode, 'OUT':responseDict}}) TestExecutor._LOGGER.debug("updated session: " + str(control['session'])) if not isSuccess: self.__recordHit(control, sid, timeTaken, False) return