Child pagesOverviewChromium development places a high premium on tests, tests, tests, tests, and more tests. In order to maintain a rapid rate of development across multiple platforms and an ever increasing set of features, it is imperative that test suites be updated, maintained, executed, and evolved. The Chromium Buildbots are employed to run these tests 24x7.Developers contributing code are expected to always run all tests. Given the volume of tests combined with the multitude of platforms, this can be a daunting task. But fear not, your Chromium teammates will help you too. The goal is to keep the source tree always building so that regressions are minimized and developer productivity is maximized. When contributing code, always consider whether your change has enough testing. If it is a new feature or module, it should almost certainly be accompanied by tests.
After committing a change, you should use the Chromium Buildbot to monitor that the automated tests pass with your change. Please be reachable by email or IRC after check-in in case something unexpected happens.
Test Development Infrastructure To assist with building tests, several pieces of infrastructure exist. A truism with testing is that more is always needed.
Here are some tools you might find useful:
Running basic testsWindows
Linux
Mac
If you want to run the tests from Terminal — for instance, to filter sub-tests — do this instead:
Running a particular subtestThe above test executables are built with gtest, so they accept command line arguments to filter which sub-tests to run. For instance,base_unittests --gtest_filter=FileUtilTest.*Chrome Frame SSL tests
On Windows, if you plan to run the Chrome Frame network tests with the host network stack (
To do this on Windows Vista or Windows 7:
Layout testsWebKit has a large suite of tests that typically verify a page is laid out properly. We use them to verify much of the code that runs within a Chromium renderer.To run these tests, build test_shell, change into the webkit directory, and run ./tools/layout_tests/run_webkit_tests.sh --debug .More information about running layout tests or fixing layouts tests can be found on the WebKit Layout Tests page.
Get dumps for Chromium crashes on Windows Before running the tests, make sure to run crash_service.exe. We use this program to intercept crashes in chromium and write a crash dump in the Crash Reports folder under the User Data directory of your chromium profile.If you also want crash_service.exe to intercept crashes for your normal Google Chrome or Chromium build, add the flag --noerrdialogs.You can also use the flag
--enable-dcheck to get assertion errors in release mode. |