Closed
Bug 1001540
Opened 11 years ago
Closed 7 years ago
Gaia integration tests for NFC URL sharing
Categories
(Firefox OS Graveyard :: NFC, defect)
Firefox OS Graveyard
NFC
Tracking
(tracking-b2g:backlog)
RESOLVED
WONTFIX
tracking-b2g | backlog |
People
(Reporter: kamituel, Assigned: kamituel)
References
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
Expected results:
We should have integration tests for a basic scenario where user receives URL via NFC (i.e. browser app should open and load the given URL).
Once NFC support in emulator lands, would it be possible to have such test cases?
Blocks: NFC-Gaia
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(alive)
Comment 1•11 years ago
|
||
Yes but what's the NFC support for emulator? If there's a bug to implement it please link here.
Flags: needinfo?(alive)
Comment 2•11 years ago
|
||
This bug blocks NFC 2.0 release.
Blocks: b2g-NFC-2.0
blocking-b2g: --- → backlog
Updated•11 years ago
|
Whiteboard: [systemsfe]
Updated•11 years ago
|
Assignee: nobody → kamituel
Assignee | ||
Comment 3•10 years ago
|
||
Since we cannot really run emulator command in Python integration test case (Gaia UI tests), we're blocked by 997244.
Depends on: 997244
Comment 4•10 years ago
|
||
The python marionette client does support runEmulatorCommand, e.g http://mxr.mozilla.org/mozilla-central/search?string=runEmulatorCmd
It might take a bit of work getting these tests running against TBPL though, either as part of Gu, Mn or something else.
Comment 5•10 years ago
|
||
We'd probably need to add this to Gaia-ui-tests, since the webapi tests don't use a functional version of Gaia.
Assignee | ||
Comment 6•10 years ago
|
||
Jonathan, are you having in mind populating Marionette.emulator field? It is null right now, even when tests are run on emulator. I'm not sure why.
I think for me to be able to write test cases required in this bug, I'd need to be able to do something like:
> from gaiatest import GaiaTestCase
>
> class TestNfcSharing(GaiaTestCase):
> def setUp(self):
> GaiaTestCase.setUp(self)
>
> def test_url_sharing(self):
> self.emulator._run_telnet("nfc snep put -1 -1 [208,1,VQ,AWdvb2dsZS5jb20=,A]")
> # or:
> self.marionette.emulator._run_telnet("...")
>
> # Do assertions here:
> # - did browser launch
> # - is URL valid
> # - ...
Since it wasn't easily possible on Gaia UI tests (emulator field being null), I was assuming I'll wait for JS Gaia tests to land (the stuff Andrew is working on) and do it there. Does that make sense?
How should I approach it: (1) gaia-ui-tests (python) or (2) architecture Andrew is working on?
If it's 1, should I file a bug so I can access emulator instance from within GaiaTestCase?
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(jgriffin)
Comment 7•10 years ago
|
||
I believe self.marionette.emulator shouldn't be null. Could you show me the command-line you're launching gaiatest with?
As far as Python vs JS, I think writing the tests in Python would get them running sooner in TBPL, but if timing isn't a big concern, you could target whichever language you happen to prefer.
Flags: needinfo?(jgriffin)
Assignee | ||
Comment 8•10 years ago
|
||
Having started the emulator and having port 2828 forwarded, I'm using this command:
> gaiatest --address=localhost:2828 tests/functional/clock/test_clock_create_new_alarm.py
I've added this test case:
def test_one(self):
print("Emulator: ", self.marionette.emulator)
It prints:
> ('Emulator: ', None)
Am I running this incorrectly?
Comment 9•10 years ago
|
||
Yes, that command-line won't allow you to access an emulator object. To launch it with real emulator support, don't run the emulator manually, instead, launch gaiatest with:
gaiatest --emulator arm --homedir /path/to/b2g-distro tests/functional/clock/test_clock_create_new_alarm.py
where /path/to/b2g-distro is the path to the emulator package you've downloaded and extracted, _or_ the path to a local B2G repo where you've build an emulator.
Updated•10 years ago
|
Whiteboard: [systemsfe]
Updated•10 years ago
|
blocking-b2g: backlog → ---
tracking-b2g:
--- → backlog
Comment 10•7 years ago
|
||
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•