diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 23:41:16 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 23:41:16 +0000 |
commit | f2d5f5b60f7acc3cdb07b0d5f7a0eef469dc6080 (patch) | |
tree | 0be116facae4d39cce98f5d69cc820b0744bd0a8 /chrome/test | |
parent | ad22771a6d4e3a0bc77dcecf577719c0bda164ee (diff) | |
download | chromium_src-f2d5f5b60f7acc3cdb07b0d5f7a0eef469dc6080.zip chromium_src-f2d5f5b60f7acc3cdb07b0d5f7a0eef469dc6080.tar.gz chromium_src-f2d5f5b60f7acc3cdb07b0d5f7a0eef469dc6080.tar.bz2 |
Instant Extended needs Windows FYI bot for "Manual" test runs
Adds web-page-replay data and scripts for running InstantExtendedManualTests
in test environment.
BUG=223211
TEST=InstantExtendedManualTest.*
R=jered@chromium.org, xusydoc@chromium.org
Review URL: https://chromiumcodereview.appspot.com/13824002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193803 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/data/search/replay/archive.wpr | 0 | ||||
-rwxr-xr-x | chrome/test/data/search/tools/instant_extended_manual_tests.py | 67 |
2 files changed, 67 insertions, 0 deletions
diff --git a/chrome/test/data/search/replay/archive.wpr b/chrome/test/data/search/replay/archive.wpr new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/chrome/test/data/search/replay/archive.wpr diff --git a/chrome/test/data/search/tools/instant_extended_manual_tests.py b/chrome/test/data/search/tools/instant_extended_manual_tests.py new file mode 100755 index 0000000..98a0bb0 --- /dev/null +++ b/chrome/test/data/search/tools/instant_extended_manual_tests.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python +# Copyright 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Records or runs web-page-replay data for InstantExtendedManualTests.*. +Typical usage is: + + $ cd src/chrome/test/data/search/tools/ + $ sudo instant_extended_manual_tests.py record \ + ../../../../../third_party/webpagereplay/replay.py \ + ../../../../../out/Debug/interactive_ui_tests \ + ../replay/archive.wpr + +This will create the archive.wpr file against the lastest google.com GWS. +The tests then can be isolated from the live site by replaying this captured +session on the bots. + +This archive.wpr file should be re-recorded and checked into the repo whenever +new manual tests are created. +""" + +import signal +import subprocess +import sys + +def Usage(): + print 'Usage: sudo python instant_extended_manual_tests.py (record|run) \\' + print ' <path/to/replay> <path/to/ui_tests> <path/to/data>' + return 1 + +def ReplayTests(replay_path, test_path, data_path, arg=None): + # Start up web-page-replay. + if not arg: + p = subprocess.Popen([replay_path, data_path]) + else: + p = subprocess.Popen([replay_path, arg, data_path]) + + # Run the tests within the mock server. + return_value = subprocess.call( + [test_path, + '--gtest_filter=InstantExtendedManualTest.*', + '--run-manual', + '--instant-url=http://www.google.com/webhp?sourceid=chrome-instant' \ + '&espv=2&es_sm=91&ie=UTF-8&fesp=1', + '--enable-benchmarking', + '--enable-stats-table']) + + # Shut down web-page-replay and save the recorded session to |data_path|. + p.send_signal(signal.SIGINT) + p.wait() + return return_value + +def main(): + if len(sys.argv) != 5: + return Usage() + + if sys.argv[1] == 'record': + return ReplayTests(sys.argv[2], sys.argv[3], sys.argv[4], '--record') + + if sys.argv[1] == 'run': + return ReplayTests(sys.argv[2], sys.argv[3], sys.argv[4]) + + return Usage() + +if __name__ == '__main__': + sys.exit(main()) |