def testStartupBenchmarkRepeatCount(self): arguments = { 'configuration': 'chromium-rel-mac11-pro', 'target': 'telemetry_perf_tests', 'dimensions': '{}', 'benchmark': 'start_with_url.warm.startup_pages', 'browser': 'release', } expected_quests = [ quest.FindIsolate('chromium-rel-mac11-pro', 'telemetry_perf_tests'), quest.RunTest({}, _STARTUP_BENCHMARK_RUN_TEST_ARGUMENTS), quest.ReadHistogramsJsonValue(None) ] self.assertEqual(quest_generator.GenerateQuests(arguments), (arguments, expected_quests))
def testMinimumArguments(self): arguments = { 'configuration': 'chromium-rel-mac11-pro', 'target': 'telemetry_perf_tests', 'dimensions': '{}', 'benchmark': 'speedometer', 'browser': 'release', } expected_quests = [ quest.FindIsolate('chromium-rel-mac11-pro', 'telemetry_perf_tests'), quest.RunTest({}, _MIN_TELEMETRY_RUN_TEST_ARGUMENTS), quest.ReadHistogramsJsonValue(None) ] self.assertEqual(quest_generator.GenerateQuests(arguments), (arguments, expected_quests))
def testAllArguments(self): arguments = { 'configuration': 'chromium-rel-mac11-pro', 'target': 'telemetry_perf_tests', 'dimensions': '{"key": "value"}', 'benchmark': 'speedometer', 'browser': 'release', 'story': 'http://www.fifa.com/', 'extra_test_args': '["--custom-arg", "custom value"]', } expected_quests = [ quest.FindIsolate('chromium-rel-mac11-pro', 'telemetry_perf_tests'), quest.RunTest({'key': 'value'}, _ALL_TELEMETRY_RUN_TEST_ARGUMENTS), quest.ReadHistogramsJsonValue(None) ] self.assertEqual(quest_generator.GenerateQuests(arguments), (arguments, expected_quests))
def _ReadHistogramsJsonValue(request): arguments = {} chart = request.get('chart') if chart: arguments['chart'] = chart statistic = request.get('statistic') if statistic: arguments['statistic'] = statistic tir_label = request.get('tir_label') if tir_label: arguments['tir_label'] = tir_label trace = request.get('trace') if trace: arguments['trace'] = trace return arguments, quest_module.ReadHistogramsJsonValue( chart, tir_label, trace, statistic)
def testAllArguments(self): arguments = { 'configuration': 'chromium-rel-mac11-pro', 'target': 'telemetry_perf_tests', 'dimensions': '{"key": "value"}', 'benchmark': 'speedometer', 'browser': 'release', 'tir_label': 'pcv1-cold', 'chart': 'timeToFirst', 'statistic': 'avg', 'trace': 'trace_name', } expected_quests = [ quest.FindIsolate('chromium-rel-mac11-pro', 'telemetry_perf_tests'), quest.RunTest({'key': 'value'}, _MIN_TELEMETRY_RUN_TEST_ARGUMENTS), quest.ReadHistogramsJsonValue( 'timeToFirst', 'pcv1-cold', 'trace_name', 'avg'), ] self.assertEqual(quest_generator.GenerateQuests(arguments), (arguments, expected_quests))