Remember to clean your *.pyc when things go awry…

nhirata_: well that’s the screwest thing…
[11:09am] nhirata_: screwiest thing…
[11:10am] nhirata_: I think when I copied the python file the reference is somehow moved with it?  I went from working with one directory of gaia to a completely different directory of gaia
[11:11am] nhirata_:  File “/Volumes/Projects/master_gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/browser/”, line 28, in test_browser_menu_windows
[11:11am] nhirata_:     browser.tap_menu_button()
[11:11am] nhirata_:   File “/Volumes/Projects/B2G_Flame/gaia/tests/python/gaia-ui-tests/gaiatest/apps/search/regions/”, line 45, in tap_menu_button
[11:11am] nhirata_:     self.marionette.find_element(*self._menu_button_locator).tap()
[11:12am] krupa|lunch left the chat room. (Quit: Linkinus –
[11:13am] kraj joined the chat room.
[11:14am] nhirata_: Is there any way to clear whatever is being cached?
[11:44am] nhirata_: hrm.  I guess I am just going to have to work in that directory…
[12:06pm] AutomatedTester: nhirata_: delete the *.pyc files
[12:06pm] nhirata_: oh.
[12:06pm] nhirata_: I feel dumb now
[12:07pm] AutomatedTester: nhirata_: everyone, and I mean everyone, gets hit by this regularly
[12:07pm] AutomatedTester: even people who have been doing python for years
[12:07pm] AutomatedTester: sometimes it gets overwritten, sometimes its just cached and doesnt
[12:10pm] AaronMT: I suspect AutomatedTester has written a book about this.
[12:11pm] AutomatedTester: AaronMT: I have but apparently it’s so common that no publishing house wants it
[12:11pm] AutomatedTester: and I really want it edited before I release it
[12:12pm] nhirata_: lol
[12:12pm] smooney left the chat room. (Client exited)
[12:14pm] nhirata_: hrm.  rm -rf *.pyc doesn’t seem to work from a higher directory
[12:15pm] AutomatedTester: nhirata_: you need to do all the directories
[12:15pm] AutomatedTester: one sec, I have an alias for it
[12:15pm] AaronMT: alias pycclean=’find . -name “*.pyc” | xargs -I {} rm -v “{}”‘
[12:16pm] AutomatedTester: find . -name ‘*.pyc’ -exec rm {} \;
[12:16pm] nhirata_: oooo…
[12:16pm] nhirata_: hotness
[12:26pm] AutomatedTester: see what I mean… it’s so common, why have it published

Posted in Uncategorized | Leave a comment

Einstein Quote for Mozillians

“Out of clutter, find simplicity. From discord find harmony. In the middle of difficulty lies opportunity.” – Albert Einstein

From :

Posted in Planet | Tagged | Leave a comment

There’s a story about Einstein and how he never remembered his phone number:

Why remember something where you know you can reference things?  From that article I also gathered:

“Out of clutter, find simplicity. From discord find harmony. In the middle of difficulty lies opportunity.” – Albert Einstein


“Only put in enough energy and effort so as to pull out of life what really matters, what you really want. Be organized enough that you can find everything you need or want, when you need or want it. But don’t fret over the small stuff. And have a way to be confident you can tell the small stuff from the big stuff. “

Anyhow, I’ve decided to start using my blog as a means of writing notes for myself, because I tend to forget things, and I started finding my blog as a good source of reference how to do something.  I also have notes in a wiki:

I use that as a quick reference and then do a find in page to get to what I need to.

Anyhow, in my learning about python and marionette, I needed to learn how to do somethings and Dave Burns was kind enough to point me to some docs. It taught me a few things.

Context Management is important; in real life and in marionette :

Docs on Web APIs:

And the marionette latest references :

In order to get contents of an element : “you can execute script to give you the innerHTML of the parent element to give you what the DOM has for it”

Thanks, Dave, for the help!

Posted in Uncategorized | Leave a comment

QA Experimentation on Process and Automation

I’ve started coding some tests and I’m placing my own repo as I may not necessarily want them checked into the main repo.

I’m not sure the best method for this, at some point I plan to have a machine running various tests that I’ve created which we might not necessarily want to have run on a constant basis.

Basically I want to stagger my tests that check various things:

For example:
Test set A would have a context menu check for open a new window and open a new window using that.
Test set B would have a context menu check for open a new private window and open a new private window using that

Then I would alternate running test set A and test set B for faster coverage.  Bob  Moss talked about this way back when he was a director of QA.  I think we can get a broad area of coverage + a variety of tests running if we spread out the tests in several sets.

My plan is to get good enough where I can do exploratory testing + some automation in a similar fashion in the areas that I am covering so I have smoke tests + functional tests automated that I can run on a weekly (if not daily) basis.  When we get to stabilization phase that’s when we can triage which tests we want to push into the rest of the repo.  It’s a bit ambitious, I understand with the amount of maintenance I may have to do. and it also depends on the areas of course.

Basically with this, I’m experimenting on how much automation we can balance and leverage before the maintenance cost becomes too high.  My goal is to try to optimize my own processes and see what works best for me.  If it gets overwhelming I will change up.  I’m not even sure I will be able to completely go with this idea as of yet.

One of the other things I was thinking about… Is there a way to have marionette report to moztrap with the results to an associated test?  Because then we can have individuals using the automation tests that doesn’t report to tree herder or jenkins report test runs….

This is the type of experimentation that I do in order to find bugs faster.  It’s how I figured out exploratory testing finds bugs faster than the traditional regression based testing.  I had empirical data and tried this approach on multiple products in various companies to make sure that it wasn’t because of my expert knowledge in the product.  FileMaker Pro, Powerpoint, and it carried on with Firefox for Android.  More over you can find bugs faster by looking at areas that have just recently changed and talking to dev about the changes implemented.  This is also from studying with my QA mentor when I first started QAing.  With experience you can take a look at the changes and figure out what to test for in order to check if a bug exists or not.  i.e. if a variable is initialized properly or not (which can be tested by creating a new profile and seeing if the app crashes), etc.

My mentor had also ran automation on new areas as well as old areas.  This is where I haven’t done any experimentation to see what is the best balance as of yet in terms of maintenance cost.  I’m not sure how successful my experimentation will be; wish me luck!

The new test can be found here :

note:I edited it so that I post a branch to the gaia repo that I already have upon suggestion by my peers.

Posted in QMO | Leave a comment

Python noobin’

Ya, I’m a python noob.  Thanks to mdas and njpark I learned about import pdb.

Basically I placed an import pdb line at the top and pdb.set_trace() where I want to stop.  ( see might be helpful, especially the section 26.3 )

import pdb

from gaiatest import GaiaTestCase
from import Search
from gaiatest.apps.system.regions.activities import Activities
from gaiatest.apps.system.regions.cards_view import CardsView

class TestBrowserWindows(GaiaTestCase):

    def setUp(self):
        self.apps.set_permission_by_url(Search.manifest_url, 'geolocation', 'deny')

        self.test_url = self.marionette.absolute_url('mozilla.html')

    def test_browser_menu_windows(self):
        search = Search(self.marionette)
        browser = search.go_to_url(self.test_url)

        activities = Activities(self.marionette)


        cardsview = CardsView(self.marionette)

This way I can debug my code, using commands such as:


ie. I can do something like browser.__dict__ or dir(browser)

It helped out a lot.

PS : I really <3 Pycharm

Posted in Uncategorized | Leave a comment

Question on being Open…

One of the things I am grateful for in working for Mozilla is the opportunity to learn.

Recently through various channels, I’ve learned about values, trust and integrity.  (Side note: I highly recommend the book that I am currently reading : The Speed of Trust)

Values are highly important to people and the company/culture.  ( Side note: I also found that for those that throw away the very value that they are trying to protect at all cost will find themselves very miserable. )

Maybe I am dumb; I don’t understand a few things still though and I need help understanding it after even having worked 4 years at the company.  These are the top two things that still cause me to wonder:

1) How does one stay open about protecting privacy/IP and how can we protect privacy/IP and still be open?  And without being miserable?

2) How do we stay open in a fast moving environment where we’re constantly busy?  The context of this is that I had been talking to a few coworkers and when we were talking, I happened to tell them something they weren’t aware of.  The expression “oh I wish I knew that sooner” was stated.  Blogs and emails can be missed often, and in some people’s cases skipped from being read; miss a meeting and you won’t hear about it.  Asking around and trying to get the source of truth sometimes is hard and doesn’t scale, etc. etc.  Everyone has a different way of working it seems… how do you get the source of truth and maintain doing the work load of going faster?

Posted in Planet, QMO | Tagged , | Leave a comment

Here may be some random bits of useful information :

* FYI, since Aki left, a temporary place for the hash from hg to git can be found :
The bug was created to find a more permanent place for the map files, etc. Bug 929336 is tracking that!topic/

What is this useful for?  Finding out the hg to gaia hash for backout purposes such as for bug 1046956
* some useful git hub commands are posted here in this wiki:

Posted in B2G, Gaia, QA, QMO, Uncategorized | Leave a comment