Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1561)

Issue 9420037: reuse the same browser when running webdriver tests (Closed)

Created:
8 years, 10 months ago by Jennifer Messerly
Modified:
8 years, 2 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

This change runs WebDriver tests in batch mode. This means that it keeps N browsers open, where N is the number of jobs in test.dart. It then passes each in-browser test to the next available browser. This is analogous to how DartC tests reuse the java process. It seems to cut about 30-40% off the run time of tests on Mac+Firefox, with roughly similar gains for other browsers. It also might reduce the browser startup flakiness--although this needs more testing. I reused almost all of the logic and protocol from DartC's batch runner. Most of the changes are in run_selenium.py, which now implements the batch protocol when started with --batch. A few changes to BatchProcessRunner: 1. it can now pass arguments when starting the batch process. We need this to start "python run_selenium.py --batch" 2. related to #1, it needs to remove the run_selenium argument when running each individual test. 3. added a graceful shutdown command so run_selenium can shutdown. I would've preferred SIGTERM or SIGINT, but it doesn't look like that's supported in the Process API (sends only SIGKILL). Changes to run_selenium.py: 1. Add a batch mode 2. Factored the common functionality to preserve "single run" mode Committed: https://code.google.com/p/dart/source/detail?r=4491

Patch Set 1 #

Patch Set 2 : updated #

Total comments: 41

Patch Set 3 : updated #

Patch Set 4 : comment fixes #

Patch Set 5 : added comment about processQueue #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -99 lines) Patch
M tools/testing/dart/test_runner.dart View 1 2 3 4 20 chunks +86 lines, -46 lines 1 comment Download
M tools/testing/dart/test_suite.dart View 1 chunk +3 lines, -2 lines 0 comments Download
M tools/testing/run_selenium.py View 1 2 6 chunks +160 lines, -51 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Jennifer Messerly
8 years, 10 months ago (2012-02-18 01:43:51 UTC) #1
Jennifer Messerly
On 2012/02/18 01:43:51, John Messerly wrote: btw -- no rush to get this change in, ...
8 years, 10 months ago (2012-02-18 01:46:26 UTC) #2
Emily Fortuna
https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart#newcode102 tools/testing/dart/test_runner.dart:102: List<String> get batchRunnerArguments() => ['-batch']; Why use one dash ...
8 years, 10 months ago (2012-02-21 18:19:35 UTC) #3
Jennifer Messerly
PTAL https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart#newcode102 tools/testing/dart/test_runner.dart:102: List<String> get batchRunnerArguments() => ['-batch']; On 2012/02/21 18:19:35, ...
8 years, 10 months ago (2012-02-21 18:58:42 UTC) #4
Emily Fortuna
lgtm, with changes in comments! https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart#newcode102 tools/testing/dart/test_runner.dart:102: List<String> get batchRunnerArguments() => ...
8 years, 10 months ago (2012-02-21 19:35:33 UTC) #5
Jennifer Messerly
Thanks! I'll get to work on merging. Of course the real tests will be: does ...
8 years, 10 months ago (2012-02-21 21:29:56 UTC) #6
Emily Fortuna
re: your processQueue message at the beginning: Sounds fine to me. lgtm! https://chromiumcodereview.appspot.com/9420037/diff/2001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart ...
8 years, 10 months ago (2012-02-21 21:40:33 UTC) #7
Bill Hesse
8 years, 2 months ago (2012-09-25 12:48:45 UTC) #8
We came across a potential problem when diagnosing a bug in co19 tests running
on dartc.

https://chromiumcodereview.appspot.com/9420037/diff/10003/tools/testing/dart/...
File tools/testing/dart/test_runner.dart (right):

https://chromiumcodereview.appspot.com/9420037/diff/10003/tools/testing/dart/...
tools/testing/dart/test_runner.dart:392: _executable = testCase.executablePath;
Why isn't there an assignment to _batchArguments here?  If it is needed in line
400, it should also be needed here.

Powered by Google App Engine
This is Rietveld 408576698