def test_function(benchmark_obj):

    os.system(f"cms set cloud={benchmark_obj.provider_name}")
    thrown = None

    benchmark_obj.setup_function()

    StopWatch.start(benchmark_obj.test_name)
    try:
        data = benchmark_obj.function(
        )  #TODO allow inputs from args/kwargs too #e.g. stop, start need image name
        StopWatch.stop(benchmark_obj.test_name)

        valid = benchmark_obj.validation_function(data)
        results = StopWatch.__str__()

    except Exception as e:
        print(e)
        StopWatch.stop(benchmark_obj.test_name)
        valid = False
        thrown = e

    sw = StopWatch.__str__().split(" ")

    result = ComputeBenchmarkOutput(benchmark_obj.provider_name,
                                    benchmark_obj.function_name, sw[1], sw[2],
                                    valid, thrown if thrown else None)

    return result