Closed Bug 1897176 Opened 7 months ago Closed 2 months ago

Investigate running Robolectric unit tests from root folder.

Categories

(Fenix :: General, enhancement, P1)

All
Android
enhancement

Tracking

(firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: mcarare, Assigned: mcarare)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group1])

Attachments

(1 file)

Currently, when running tests with Robolectric, they fail with ResourcesNotFoundException if there is any Android resource ( like a string) needed and they are started from the root folder instead of the module where they reside ( android-components for example.)

Blocks: 1897186

The Bugbug bot thinks this bug should belong to the 'Fenix::UI Tests' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → UI Tests
Component: UI Tests → General

Ran into another issue generated by this.

When testing Robolectric with SDK 35 as a target (https://bugzilla.mozilla.org/show_bug.cgi?id=1920977)I noticed that the tests that fail when run from the AC module pass when run from the root folder. This is due to the fact that they run on SDK 21 ( min SDK) instead of the target SDK.

So I believe there is a common cause and a common fix for these effects.

Assignee: nobody → mcarare
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [fxdroid][group1]
Pushed by mcarare@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/69309dddbc10 Allow unit tests to access and use app resources. r=tthibaud
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: