Make B2G automation code more accessible

RESOLVED WONTFIX

Status

Testing
Mozbase
RESOLVED WONTFIX
5 years ago
2 years ago

People

(Reporter: mdas, Assigned: mdas)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Rising from https://bugzilla.mozilla.org/show_bug.cgi?id=852235#c9 and https://bugzilla.mozilla.org/show_bug.cgi?id=852235#c12, we should have frequently copy-pasted b2g automation code, like b2g process restarting or profile management, in a gaiatest/marionette-client independent environment so we can separate concerns and import what we need.

This bug is to define what automation functions are repeated with regards to b2g and to find the appropriate places for this code.
I'm not sure how far this goes, but the initial ones that come to mind that I've used from several packages are stopping/starting b2g and removing the persistent storage and profile:

stopping b2g:
https://github.com/mozilla-b2g/gaia/blob/ff81d7e4bc6984ad64d029c90b3fea0eeb501bc1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L743

starting b2g:
https://github.com/mozilla-b2g/gaia/blob/ff81d7e4bc6984ad64d029c90b3fea0eeb501bc1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L722

cleanup:
https://github.com/mozilla-b2g/gaia/blob/ff81d7e4bc6984ad64d029c90b3fea0eeb501bc1/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L831

There are also things like connecting to wifi/cell data, enabling bluetooth, etc. Would these go into this too? Currently these are in gaia, which allows them to differ between branches. If we use one common package then we will need to ensure it supports multiple branches. Also, having another package might cause friction if we need to fix the package and release a new version in order to fix broken tests. We probably just need to be careful how much we pull out.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.