Пример #1
0
 def test_locust_slave_results_errors(self):
     obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves2.ldjson", 2, ROOT_LOGGER)
     points = [x for x in obj.datapoints(True)]
     self.assertEquals(60, len(points))
     for point in points:
         self.assertEquals(len(point[DataPoint.CURRENT][''][KPISet.ERRORS]), 1)
         self.assertGreaterEqual(point[DataPoint.CURRENT][''][KPISet.FAILURES], 70)
Пример #2
0
 def test_locust_slave_results(self):
     obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves.ldjson", 2, ROOT_LOGGER)
     points = [x for x in obj.datapoints(True)]
     self.assertEquals(107, len(points))
     for point in points:
         self.assertGreater(point[DataPoint.CURRENT][''][KPISet.AVG_RESP_TIME], 0)
         self.assertGreater(point[DataPoint.CURRENT][''][KPISet.BYTE_COUNT], 0)
Пример #3
0
    def test_locust_slave_results(self):
        if six.PY3:
            logging.warning("No locust available for python 3")

        obj = SlavesReader(__dir__() + "/../locust/locust-slaves.ldjson", 2, logging.getLogger(""))
        points = [x for x in obj.datapoints(True)]
        self.assertEquals(107, len(points))
        for point in points:
            self.assertGreater(point[DataPoint.CURRENT][''][KPISet.AVG_RESP_TIME], 0)
Пример #4
0
    def test_locust_slave_results(self):
        if six.PY3:
            logging.warning("No locust available for python 3")

        obj = SlavesReader(__dir__() + "/../locust/locust-slaves.ldjson", 2, logging.getLogger(""))
        points = [x for x in obj.datapoints(True)]
        self.assertEquals(107, len(points))
        for point in points:
            self.assertGreater(point[DataPoint.CURRENT][''][KPISet.AVG_RESP_TIME], 0)
Пример #5
0
 def test_locust_slave_results_errors(self):
     obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves2.ldjson", 2,
                        ROOT_LOGGER)
     points = [x for x in obj.datapoints(True)]
     self.assertEquals(60, len(points))
     for point in points:
         self.assertEquals(len(point[DataPoint.CURRENT][''][KPISet.ERRORS]),
                           1)
         self.assertGreaterEqual(
             point[DataPoint.CURRENT][''][KPISet.FAILURES], 70)
Пример #6
0
 def test_locust_slave_results(self):
     obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves.ldjson", 2,
                        ROOT_LOGGER)
     points = [x for x in obj.datapoints(True)]
     self.assertEquals(107, len(points))
     for point in points:
         self.assertGreater(
             point[DataPoint.CURRENT][''][KPISet.AVG_RESP_TIME], 0)
         self.assertGreater(point[DataPoint.CURRENT][''][KPISet.BYTE_COUNT],
                            0)
Пример #7
0
    def test_locust_slave_results_errors(self):
        if six.PY3:
            logging.warning("No locust available for python 3")

        obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves2.ldjson", 2, logging.getLogger(""))
        points = [x for x in obj.datapoints(True)]
        self.assertEquals(60, len(points))
        for point in points:
            self.assertEquals(len(point[DataPoint.CURRENT][''][KPISet.ERRORS]), 1)
            self.assertGreaterEqual(point[DataPoint.CURRENT][''][KPISet.FAILURES], 70)
Пример #8
0
 def test_slave_aggregation(self):
     self.configure({
         "execution": {
             "scenario": {
                 "script": RESOURCES_DIR + "locust/simple.py"
             }
         }
     })
     self.obj.prepare()
     self.obj.reader = SlavesReader(
         RESOURCES_DIR + "locust/locust-slaves.ldjson", 2, ROOT_LOGGER)
     self.obj.engine.aggregator = ConsolidatingAggregator()
     self.obj.engine.aggregator.add_underling(self.obj.reader)
     self.assertEqual(
         1,
         len(list(self.obj.engine.aggregator.datapoints(final_pass=True))))
Пример #9
0
 def test_locust_delayed_slave(self):
     obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves-none.ldjson",
                        2, ROOT_LOGGER)
     points = [x for x in obj.datapoints(True)]
     self.assertEquals(0, len(points))
Пример #10
0
 def test_locust_delayed_slave(self):
     obj = SlavesReader(RESOURCES_DIR + "locust/locust-slaves-none.ldjson", 2, ROOT_LOGGER)
     points = [x for x in obj.datapoints(True)]
     self.assertEquals(0, len(points))