def getTestResults(self): """ To get test results, you must call pollStatsAndCheckStats() from the script. Test results are set in pollStatsAndCheckStatResults() HTTPClient Passed: TCP Connections Established Passed: HTTP Simulated Users Passed: HTTP Connections Passed: HTTP Transactions Passed: HTTP Connection Attempts HTTPServer Passed: TCP Connections Established Passed: TCP Connection Requests Failed Result: Passed|Failed Return A dictionary of all the statNames and passed/failed results """ if self.testResults is None: return finalResult = 'Passed' self.logInfo('\nTest result for each statistic:\n{}'.format('-'*31), timestamp=False) for statType in self.testResults.keys(): if statType == 'result': continue self.logInfo('\n{}'.format(statType), timestamp=False) if isinstance((self.testResults[statType]), dict): for statName,result in self.testResults[statType].items(): self.logInfo('\t{}: {}'.format(result, statName), timestamp=False) if result == 'Failed': finalResult = 'Failed' self.testResults['result'] = finalResult self.logInfo('\nFinal Result: {}'.format(finalResult), timestamp=False) return self.testResults