I'm trying to write some performance tests in funkload. I would like to do some service discovery in the test setUpCycle() and then have that information passed to every thread the benchmark starts. However setting a variable in the setUpCycle() or setupBench() does not propagate to the test itself. Is there any way to do this?
class PerfTest(FunkLoadTestCase):
def setUpCycle(self):
self.service = service_discover() # this is a costly operation
def test_Get(self):
print self.service
Running fl-run-bench on this test fails with "'PerfTest' has no attribute 'service'.