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)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Silne30, Assigned: njpark)
References
Details
Attachments
(1 file)
No description provided.
| Assignee | ||
Updated•10 years ago
|
Assignee: nobody → npark
Comment 1•10 years ago
|
||
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
Comment 2•10 years ago
|
||
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.
Comment 3•10 years ago
|
||
> 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'
> ```
| Assignee | ||
Comment 4•10 years ago
|
||
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.
| Assignee | ||
Comment 5•10 years ago
|
||
The location of forked style guide from Web QA is here:
https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide
| Assignee | ||
Comment 6•10 years ago
|
||
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)
Comment 7•10 years ago
|
||
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
Comment 8•10 years ago
|
||
R+ on No-Jun's parts. These pages are in good shape for being our first revision.
Attachment #8686615 -
Flags: review+
Comment 9•10 years ago
|
||
Comment on attachment 8686615 [details]
https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide
I filled up my parts and moved things around in:
* https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide/Best_Practices
* https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide/Avoiding_Duplication
* https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide/Submission_Review
I'm not sure the level of details is the right one. Asking No-Jun for review.
Attachment #8686615 -
Flags: review?(npark)
| Assignee | ||
Comment 10•10 years ago
|
||
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+
| Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(martijn.martijn)
Comment 11•10 years ago
|
||
Comment on attachment 8686615 [details]
https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide
I don't see a Wiki link here.
Attachment #8686615 -
Flags: review?(martijn.martijn)
Updated•10 years ago
|
Attachment #8686615 -
Flags: review?(martijn.martijn)
| Assignee | ||
Comment 12•10 years ago
|
||
| Assignee | ||
Updated•10 years ago
|
Attachment #8686615 -
Attachment description: Link to Wiki page → https://wiki.mozilla.org/B2G/QA/Automation/Style_Guide
Comment 13•10 years ago
|
||
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+
| Assignee | ||
Comment 14•10 years ago
|
||
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.
Description
•