• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = "Chrome OS Team"
6NAME = "power_LoadTest.email_1hour"
7PURPOSE = "Measure power draw when system is under load."
8CRITERIA = "This test is a benchmark."
9TIME = "LONG"
10TEST_CATEGORY = "Benchmark"
11TEST_CLASS = "power"
12TEST_TYPE = "client"
13
14DOC = """
15This test runs a load test consisting of cycling though web pages, playing
16videos, etc. and measures battery power draw. The duration of this test is
17determined by the seconds variable.
18
19
20The following manual steps need to be performed on the device under test
21before this test can be run:
22  - make sure that Ethernet cable is disconnected and WiFi is connected
23  - disconnect power cable
24
25You are now ready to run the test.
26"""
27
28# TODO (bleung): Find a way to do automatic Facebook login for test account.
29# TODO (tbroch): Find way to not replicate all these parameters that are common
30# between this control file and the original
31loop_time = 3600
32loop_count = 1
33
34# Task format:
35# This sets the tasks variable in the extension directly via javascript.
36#
37# Args:
38# type: [window, cycle] Window will open a window with tabs for the duration of
39# the window. Cycle will cycle through the urls for the duration of the window
40# every delay ms.
41# name: name of the window
42# start: start time (ms)
43# duration: duration of task (ms)
44# delay: time for each url for the cycle type (ms)
45# timeout: time before loading a url times out for the cycle type (ms)
46# focus: whether the window should be in the foreground
47# tabs: list of urls for the window type
48# urls: list of urls to cycle through for the cycle type
49
50tasks='[{' + \
51'    type: \'window\',' + \
52'    name: \'background\',' + \
53'    start: 0,' + \
54'    duration: minutes(60),' + \
55'    focus: false,' + \
56'    tabs: [' + \
57'     \'http://www.google.com\',' + \
58'     \'http://news.google.com\',' + \
59'     \'http://finance.yahoo.com\',' + \
60'     \'http://clothing.shop.ebay.com/Womens-Shoes-/63889/i.html\',' + \
61'     \'http://www.facebook.com\'' + \
62'    ]}, {' + \
63'    type: \'cycle\',' + \
64'    name: \'email\',' + \
65'    start: seconds(1),' + \
66'    duration: minutes(60),' + \
67'    delay: minutes(5),' + \
68'    timeout: seconds(10),' + \
69'    focus: true,' + \
70'    urls: [' + \
71'     \'http://gmail.com\',' + \
72'     \'http://mail.google.com\'' + \
73'    ]}, {' + \
74'    type: \'cycle\',' + \
75'    name: \'audio\',' + \
76'    start: 0,' + \
77'    duration: minutes(60),' + \
78'    delay: minutes(12),' + \
79'    timeout: seconds(10),' + \
80'    focus: false,' + \
81'    urls: [' + \
82'     \'http://www.bbc.co.uk/worldservice/audioconsole/?stream=live\',' + \
83'     \'http://www.npr.org/templates/player/mediaPlayer.html?action=3&t=live1\',' + \
84'     \'http://www.cbc.ca/radio2/channels/popup.html?stream=classical\'' + \
85']}]'
86
87
88job.run_test('power_LoadTest', loop_time=loop_time, loop_count=loop_count,
89             test_low_batt_p=6, tasks=tasks)
90