示例#1
0
 def test_read_gatling302(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-302')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 1)
     self.assertEqual(obj.guessed_gatling_version, "3.X")
     self.assertIn('group2', list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#2
0
 def test_read_labels_regular(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-3')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 10)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     self.assertIn('http://blazedemo.com/', list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#3
0
 def test_read_220_format(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     self.assertIn('/', list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#4
0
 def test_read_labels_regular(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-3')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 10)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     self.assertIn('http://blazedemo.com/', list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#5
0
 def test_read_220_format(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     self.assertIn('/', list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#6
0
 def test_read_gatling302(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-302')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 1)
     self.assertEqual(obj.guessed_gatling_version, "3.X")
     self.assertIn('group2', list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#7
0
 def test_read_group(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-4')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 179)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(2, len(last_cumul['[empty]'][KPISet.ERRORS]))
示例#8
0
 def test_read_asserts(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-1')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 3)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     self.assertIn('ping request',
                   list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#9
0
 def test_read_labels_problematic(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-2')  # problematic one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 1)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(1, last_cumul['User-Login'][KPISet.SAMPLE_COUNT])
示例#10
0
 def test_read_group(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-4')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 179)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(2, len(last_cumul['[empty]'][KPISet.ERRORS]))
示例#11
0
 def test_read(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-351')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 23)
     self.assertEqual(obj.guessed_gatling_version, "3.4+")
     self.assertIn('request_1',
                   list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#12
0
 def test_read_labels_problematic(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-2')  # problematic one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 1)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(1, last_cumul['User-Login'][KPISet.SAMPLE_COUNT])
示例#13
0
 def test_read_rc_asserts(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-5')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 1)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(1, last_cumul[''][KPISet.RESP_CODES]['400'])
     self.assertEqual(1, last_cumul[''][KPISet.RESP_CODES]['401'])
示例#14
0
 def test_read_labels_problematic(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER,
                         'gatling-2')  # problematic one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 5)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     self.assertIn('User-Login,Auth-POST',
                   list_of_values[-1][DataPoint.CUMULATIVE].keys())
示例#15
0
 def test_read_rc_asserts(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-5')  # regular one
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 1)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(1, last_cumul[''][KPISet.RESP_CODES]['400'])
     self.assertEqual(1, last_cumul[''][KPISet.RESP_CODES]['401'])
示例#16
0
 def test_read(self):
     log_path = os.path.join(os.path.dirname(__file__), '..', 'gatling')
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-0')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 23)
示例#17
0
 def test_read_220_format(self):
     log_path = os.path.join(os.path.dirname(__file__), '..', 'gatling')
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2")
示例#18
0
 def test_read(self):
     log_path = os.path.join(os.path.dirname(__file__), '..', 'gatling')
     obj = DataLogReader(log_path, logging.getLogger(''))
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 23)
示例#19
0
 def test_read_220_format(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")
示例#20
0
 def test_read_220_format(self):
     log_path = __dir__() + "/../resources/gatling/"
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2")
示例#21
0
 def test_read_220_format(self):
     log_path = os.path.join(os.path.dirname(__file__), '..', 'gatling')
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2")
示例#22
0
 def test_read_220_format(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-220')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 4)
     self.assertEqual(obj.guessed_gatling_version, "2.2+")