Closed Bug 854043 Opened 11 years ago Closed 10 years ago

Intermittent testWebContentContextMenu | Verify that the download started - The download started

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: emorley, Unassigned)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Android Armv6 Tegra 250 mozilla-inbound opt test robocop-2 on 2013-03-22 14:35:07 PDT for push a5c47f1edc12

slave: tegra-032

https://tbpl.mozilla.org/php/getParsedLog.php?id=20994526&tree=Mozilla-Inbound

{
35 INFO TEST-PASS | testWebContentContextMenu | Waiting for  Share Image  option - The Share Image  option is present
36 INFO TEST-PASS | testWebContentContextMenu | Waiting for the Share Image option menu to open - The Share Image option menu is opened
37 INFO TEST-PASS | testWebContentContextMenu | Awesomebar URL typed properly - http://mochi.test:8888/tests/robocop/robocop_picture_link.html should equal http://mochi.test:8888/tests/robocop/robocop_picture_link.html
long-clicking at 512.0, 103.0
38 INFO TEST-PASS | testWebContentContextMenu | Waiting for  Set as Wallpaper  option - The Set as Wallpaper  option is present
39 INFO TEST-UNEXPECTED-FAIL | testWebContentContextMenu | Verify that the download started - The download started
Exception caught during test!
junit.framework.AssertionFailedError: 39 INFO TEST-UNEXPECTED-FAIL | testWebContentContextMenu | Verify that the download started - The download started
	at junit.framework.Assert.fail(Assert.java:47)
	at org.mozilla.fennec.FennecMochitestAssert._logMochitestResult(FennecMochitestAssert.java:107)
	at org.mozilla.fennec.FennecMochitestAssert.ok(FennecMochitestAssert.java:136)
	at org.mozilla.fennec.tests.testWebContentContextMenu.verfyPhotoContextMenu(testWebContentContextMenu.java:201)
	at org.mozilla.fennec.tests.testWebContentContextMenu.testWebContentContextMenu(testWebContentContextMenu.java:30)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:521)
	at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:204)
	at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:194)
	at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:186)
	at org.mozilla.fennec.tests.BaseTest.runTest(BaseTest.java:125)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
	at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
	at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)
	at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)
40 INFO TEST-UNEXPECTED-FAIL | testWebContentContextMenu | Exception caught - junit.framework.AssertionFailedError: 39 INFO TEST-UNEXPECTED-FAIL | testWebContentContextMenu | Verify that the download started - The download started
41 INFO TEST-END | testWebContentContextMenu | finished in 282317ms
}
Paul -- any idea what's going wrong here?
Flags: needinfo?(paul.feher)
This patch seems to fix the issue as you can see in the try server runs
https://tbpl.mozilla.org/?tree=Try&rev=dd784197ce69
However I can't be sure until this will be run on the try server after the problem in Bug 663657 - Intermittent Android "command timed out: 2400 seconds without output, attempting to kill" will be solved.
Flags: needinfo?(paul.feher)
Comment on attachment 741801 [details] [diff] [review]
Intermittent testWebContentContextMenu V1

Review of attachment 741801 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for looking at this.

Agreed - we will need to wait for the panda instability to be sorted out before proceeding here.

::: mobile/android/base/tests/testWebContentContextMenu.java.in
@@ +199,4 @@
>                      }
>                      else {
>                          if (opt.equals("Save Image")) {
> +                            mAsserter.ok(waitForText("Save Image"), "Verify that the Save Image option is pressent", "The Save Image option is pressent");

I'm just a little concerned about removing the failing part of the test. Do you know why this sometimes failed? Could it be a problem in Firefox?
> I'm just a little concerned about removing the failing part of the test. Do
> you know why this sometimes failed? Could it be a problem in Firefox?

I don't know exactly why this fail some times but I observed that the application stops before the download notification appears so I've decided to only verify that the option exists. This also helps, do to the fact that after many downloads we risk to occupy the space on the SD card.
That's a good point -- we really should not be starting downloads in this test. 

I noticed a couple of other things:
 - We need to change:
-     Element tabCount = mDriver.findElement(getActivity(), "tabs_count");
+     Element tabCount = mDriver.findElement(getActivity(), "tabs_counter");
...that's fallout from bug 863828, while this test was disabled.
 - Depending on the screen size and resolution, the test may fail on waitForText("Save Image") because the previous check, waitForText("Set as Wallpaper"), may scroll "Save Image" off the top of the display -- and waitForText won't scroll *up*. I think the best way to fix this is to close the menu after checking for "Set as Wallpaper" and open a new one to check for "Save Image".
Closing inactive keywords:intermittent-failure bugs where the TBPLbot has previously commented and the test isn't marked as disabled; filter on orange-cleanup-201401.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: