Closed Bug 1198449 Opened 10 years ago Closed 10 years ago

Create Best Practice Document for Automation in Firefox OS

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Silne30, Assigned: njpark)

References

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → npark
We could also put the process of a patch (commit, push, PR, etc.). There is no need to rewrite the whole process. A pointer to [1] would be okay + an extra comment that we need 2 reviewers and adhoc jobs. [1] https://developer.mozilla.org/en-US/Firefox_OS/Developing_Gaia/Submitting_a_Gaia_patch
On top of my head. We could put one rule regarding the usage of assertion: > Putting a custom error message only when it provides more information than the one given by default. > For example `self.asserEqual()` is a nice assertion method: if it fails, it'll give you the expected > value and the actual. For example: > This piece of code: self.assertEqual(displayed_phone_number, expected_phone_number), will fail with: > ``` > AssertionError: u'+34...' != u'+33...' > Stacktrace: > ``` > If you provide an error message: > self.assertEqual(displayed_phone_number, expected_phone_number, msg='Phone numbers are not the same') > you'll have something like: > ``` > AssertionError: Phone numbers are not the same > Stacktrace: > ``` > In other words, by willing to add more context, you might remove some useful debug data.
> Testing strings that comes from the system (like "Missed call", or "Send"): Use `data-l10n-id` inside the Page class. For instance: > ``` > class SomePageClass() > @property > def is_labeled_as_today(self) > return element.get_attribute('data-l10n-id') == 'today' > ```
When should PageRegion class be used? is it that when locating everything under the regions/ directory, or is it for the different regions in the same class? Also, it should be noted that root_element will become stale when once the frame is changed.
The location of forked style guide from Web QA is here: https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide
https://public.etherpad-mozilla.org/p/Automation_BestPractice is up. Could you take a look and add anything that we should add to this list?
Flags: needinfo?(martijn.martijn)
Flags: needinfo?(jlorenzo)
I added some elements in the list. I think the list is big enough to be split into two. Hence, we could have a clear distinction between this bug and bug 1213243. At a fist glance, the part called "Need to mention following concepts" seems to have the same size as every other combined. What do you guys think?
Flags: needinfo?(jlorenzo)
See Also: → 1213243
R+ on No-Jun's parts. These pages are in good shape for being our first revision.
Attachment #8686615 - Flags: review+
Comment on attachment 8686615 [details] https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide Johan is working on General Concepts section, but otherwise everything else looks good to me.
Attachment #8686615 - Flags: review?(npark)
Attachment #8686615 - Flags: review?(martijn.martijn)
Attachment #8686615 - Flags: review+
Flags: needinfo?(martijn.martijn)
Attachment #8686615 - Flags: review?(martijn.martijn)
Attachment #8686615 - Flags: review?(martijn.martijn)
Attachment #8686615 - Attachment description: Link to Wiki page → https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide
Comment on attachment 8686615 [details] https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide Looks good, currently I don't really know what to add. I seem some mentions of b2g deskop, but afaik, that doesn't exist anymore or isn't used anymore. Or does MarionetteJS use b2g desktop? (I thought it uses Mulet or something) https://wiki.mozilla.org/B2G/QA/Automation/UI/Integration_suite_criteria#Firefox_OS_current_specific_considerations This makes the assumption that integration tests are only run on desktop? If the integration tests would run on device, some of these constraints wouldn't exist.
Attachment #8686615 - Flags: review?(martijn.martijn) → review+
I think MarionetteJS uses b2g desktop for the current integration testing. I hear the plan is to run those same tests on device for the integration testing.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: