Convert java unit tests to robolectric (for performance) |
||
Issue descriptionA quick codesearch tells me that we have 2 instrumentation test suites which are effectively unit tests: https://cs.chromium.org/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/AwLayoutSizerTest.java?l=23&rcl=1a157ed53531646a002bd5e74836364ac90a1e66 https://cs.chromium.org/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java?l=38&rcl=c40a10c176b8375b6f9e3d949497f4d3952a2971 It seems we could alleviate CQ a bit by converting these to robolectric. It would also serve as an example for how to write AW robolectric tests. If we think there's potential benefits, should someone investigate this? As a warning for anyone taking this on, you'll need to modify the presubmit I wrote in http://crrev/c/1184234 to allow the robolectric test runner, or move robolectric tests to a different folder.
,
Jan 4
We can expand the list: https://cs.chromium.org/search/?q=AwJUnit4ClassRunner+-AwTestContainerView+-AwActivityTestRule+file:test.java&type=cs (File operation and garbage collection tests couldn't be moved out, but FindAddressTest.java could be.) stonebraker@, could you take a look?
,
Jan 11
I'm writing a guide on testing (http://crrev/c/1399053). If we follow-through, let's add docs on robolectric to the markdown file. |
||
►
Sign in to add a comment |
||
Comment 1 by ntfschr@chromium.org
, Dec 1