Example #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())
Example #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())
Example #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())
Example #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())
Example #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())
Example #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())
Example #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]))
Example #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())
Example #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])
Example #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]))
Example #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())
Example #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])
Example #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'])
Example #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())
Example #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'])
Example #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)
Example #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")
Example #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)
Example #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+")
Example #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")
Example #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")
Example #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+")