Ejemplo n.º 1
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())
Ejemplo n.º 2
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())
Ejemplo n.º 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())
Ejemplo n.º 4
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]))
Ejemplo n.º 5
0
 def test_read_asserts(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, '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())
Ejemplo n.º 6
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, "3.4+")
     last_cumul = list_of_values[-1][DataPoint.CUMULATIVE]
     self.assertEqual(2, len(last_cumul['[empty]'][KPISet.ERRORS]))
Ejemplo n.º 7
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, "3.4+")
     self.assertIn('http://blazedemo.com/',
                   list_of_values[-1][DataPoint.CUMULATIVE].keys())
Ejemplo n.º 8
0
 def test_read_331_format(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, ROOT_LOGGER, 'gatling-331')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 2)
     self.assertEqual(obj.guessed_gatling_version, "3.3.X")
     self.assertIn('request_1',
                   list_of_values[-1][DataPoint.CUMULATIVE].keys())
Ejemplo n.º 9
0
 def test_read(self):
     log_path = RESOURCES_DIR + "gatling/"
     obj = DataLogReader(log_path, logging.getLogger(''), 'gatling-0')
     list_of_values = list(obj.datapoints(True))
     self.assertEqual(len(list_of_values), 23)
     self.assertEqual(obj.guessed_gatling_version, "2.1")
     self.assertIn('request_1',
                   list_of_values[-1][DataPoint.CUMULATIVE].keys())
Ejemplo n.º 10
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])
Ejemplo n.º 11
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])
Ejemplo n.º 12
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'])
Ejemplo n.º 13
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())
Ejemplo n.º 14
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'])
Ejemplo n.º 15
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())
Ejemplo n.º 16
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+")
Ejemplo n.º 17
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")
Ejemplo n.º 18
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+")
Ejemplo n.º 19
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)
Ejemplo n.º 20
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")
Ejemplo n.º 21
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)
Ejemplo n.º 22
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")