Closed
Bug 903528
Opened 11 years ago
Closed 11 years ago
Adapt services' JUnit unit testing framework to Fennec
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 30
People
(Reporter: mcomella, Assigned: nalexander)
References
Details
Attachments
(5 files)
43.24 KB,
patch
|
Details | Diff | Splinter Review | |
1.89 KB,
patch
|
Details | Diff | Splinter Review | |
5.75 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
35.74 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
1.42 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
The android background services team has one test suite for unit testing, which runs locally on desktop, and another test suite for integration testing, which runs on Android devices.
For mobile front-end, robocop serves the purpose of the integration test suite, however, the capabilities for unit testing are lacking.
Bug 709353 will integrate services' JUnit testing framework into the automated testing systems - at that point, we should piggy-back on these efforts and adapt it to work for Fennec.
Assignee | ||
Comment 1•11 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #0)
> The android background services team has one test suite for unit testing,
> which runs locally on desktop, and another test suite for integration
> testing, which runs on Android devices.
To add some details: the unit testing suite is JUnit 4 and requires the Java runtime to execute; the integration testing suite is JUnit 3.
Reporter | ||
Comment 2•11 years ago
|
||
Note that bug 856614 is similar and perhaps should be duped.
Comment 3•11 years ago
|
||
Starting to track Fennec tests that would be 1/5 the size if implemented on JUnit:
Bug 834033
Assignee | ||
Comment 4•11 years ago
|
||
WIP for mcomella.
Attachment #8375799 -
Flags: feedback?(michael.l.comella)
Assignee | ||
Comment 5•11 years ago
|
||
This has already been reviewed by glandium; will carry-forward the r+.
Assignee | ||
Comment 6•11 years ago
|
||
This is a cautionary move: when uploaded to infrastructure,
background.apk will not look so bad; but browser.apk is likely to
confuse folks. (These files will be in the same directory as
fennec-*apk, and sort earlier than that file.)
I considered including "tests" in the name, but decided not to make a
long name even longer.
This also renames the Android package. This is purely cosmetic, since
the package has no consumers (infrastructure, mach, etc). But this looks
nicer in IDEs: the generated classes fit into the class hierarchy.
Attachment #8380226 -
Flags: review?(rnewman)
Assignee | ||
Comment 7•11 years ago
|
||
The meat. Tested against my local device using Eclipse. Try build coming.
Attachment #8380227 -
Flags: review?(rnewman)
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8380228 -
Flags: review?(rnewman)
Assignee | ||
Comment 9•11 years ago
|
||
This is looking fine:
https://tbpl.mozilla.org/?tree=Try&rev=eb154f0de5eb
Reporter | ||
Comment 10•11 years ago
|
||
Comment on attachment 8375799 [details] [diff] [review]
Land and build Fennec JUnit 3 tests. r=mfinkle
Assuming that I'm no longer needed here - reflag me if that's not the case.
Attachment #8375799 -
Flags: feedback?(michael.l.comella)
Updated•11 years ago
|
Attachment #8380226 -
Flags: review?(rnewman) → review+
Comment 11•11 years ago
|
||
Comment on attachment 8380227 [details] [diff] [review]
Part 2: Land and build Fennec JUnit 3 tests. r=rnewman
Review of attachment 8380227 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM, but consider whether you want these tests to be 2- or 4-spaced. You've got them as 2-spaced right now.
::: mobile/android/tests/browser/junit3/Makefile.in
@@ +5,5 @@
> +ANDROID_APK_NAME := browser-junit3-debug
> +
> +ANDROID_EXTRA_JARS += \
> + browser-junit3.jar \
> + $(NULL)
Indenting.
::: mobile/android/tests/browser/junit3/src/harness/BrowserInstrumentationTestRunner.java
@@ +28,5 @@
> + Log.d(LOG_TAG, "getAndroidTestRunner");
> + AndroidTestRunner testRunner = super.getAndroidTestRunner();
> + testRunner.addTestListener(new BrowserTestListener());
> + return testRunner;
> + }
Indenting.
::: mobile/android/tests/browser/junit3/src/harness/BrowserTestListener.java
@@ +14,5 @@
> + * <p>
> + * The idea is that, on infrastructure, we'll be able to use the same test
> + * parsing code for Browser JUnit 3 tests as we do for Robocop tests.
> + * <p>
> + * In future, that is!
Bug filed for this?
Attachment #8380227 -
Flags: review?(rnewman) → review+
Comment 12•11 years ago
|
||
Comment on attachment 8380228 [details] [diff] [review]
Post: Add Eclipse project data to moz.build. r=rnewman
Review of attachment 8380228 [details] [diff] [review]:
-----------------------------------------------------------------
This is the most rubberstampy of rubberstamps.
Attachment #8380228 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/f0e73c266048
https://hg.mozilla.org/integration/fx-team/rev/b57e246db50b
https://hg.mozilla.org/integration/fx-team/rev/51c20dd62b11
https://hg.mozilla.org/integration/fx-team/rev/9d6e281584dc
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Assignee | ||
Comment 14•11 years ago
|
||
Looks like my moz.build AndroidEclipse data needed to be bumped:
https://hg.mozilla.org/integration/fx-team/rev/a7f45c95831d
Assignee | ||
Comment 15•11 years ago
|
||
Looks like there are some pre-existing build dependency problems that this patch tickles:
https://hg.mozilla.org/integration/fx-team/rev/78e1e8346461
Comment 16•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f0e73c266048
https://hg.mozilla.org/mozilla-central/rev/b57e246db50b
https://hg.mozilla.org/mozilla-central/rev/51c20dd62b11
https://hg.mozilla.org/mozilla-central/rev/9d6e281584dc
https://hg.mozilla.org/mozilla-central/rev/a7f45c95831d
https://hg.mozilla.org/mozilla-central/rev/78e1e8346461
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•