Mozmill wrapper to install specified addon xpi and then run tests

17 views
Skip to first unread message

Ankush

unread,
Dec 15, 2009, 3:20:12 AM12/15/09
to MozMill Developers, hsk...@mozilla.com
Hi,

Is there any Mozmill wrapper which can install addon xpi and then run
tests?
After discussion with Henrik, We thought it might be good to have such
wrapper to enable automation for addons using Mozmill. Is there
something existing which allows us to do this?

Thanks,
Ankush.

Mikeal Rogers

unread,
Dec 15, 2009, 3:21:57 AM12/15/09
to mozmi...@googlegroups.com, hsk...@mozilla.com
This is included by default.

The --plugins options takes a comma delimited list of plugins to install. You can also pass it the path of an uncompressed plugin during development.

$ mozmill --help

Usage: mozmill [options]

Options:
  -h, --help            show this help message and exit
  -b BINARY, --binary=BINARY
                        Binary path.
  -s, --shell           Start a Python shell
  -n, --no-new-profile  Do not create new profile.
  -l LOGFILE, --logfile=LOGFILE
                        Log all events to file.
  --report=REPORT       Report the results. Requires url to results server.
  -t TEST, --test=TEST  Run test file or directory.
  --showall             Show all test output.
  -D, --debug           Install debugging plugins.
  --show-errors         Print logger errors to the console.
  -u, --usecode         Use code module instead of iPython
  -w PLUGINS, --plugins=PLUGINS
                        Plugin paths to install.
  -p PROFILE, --profile=PROFILE
                        Profile path.
  -P PORT, --port=PORT  TCP port to run jsbridge on.

-Mikeal


--

You received this message because you are subscribed to the Google Groups "MozMill Developers" group.
To post to this group, send email to mozmi...@googlegroups.com.
To unsubscribe from this group, send email to mozmill-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mozmill-dev?hl=en.



Henrik Skupin

unread,
Dec 15, 2009, 6:55:36 AM12/15/09
to Mikeal Rogers, mozmi...@googlegroups.com
Mikeal Rogers wrote on 15.12.09 09:21:

Hi Mikeal,

> This is included by default.
>
> The --plugins options takes a comma delimited list of plugins to
> install. You can also pass it the path of an uncompressed plugin during
> development.

Ankush wanna have something which has Heather already implemented for
Jetpack. He don't want to install an plugin but will run any sort of
tests against an addon. So this addon has to be installed at any time.

--
Henrik Skupin
QA Execution Engineer
Mozilla Corporation

Heather Arthur

unread,
Dec 15, 2009, 4:20:05 PM12/15/09
to mozmi...@googlegroups.com
If you just want to install an add-on and run Mozmill tests against it then you can just use the command argument like Mikeal said. For Jetpack, I added a wrapper around this so that I could have the Jetpack add-on installed by default. The code is here: http://code.google.com/p/jetmill/ and wiki page https://wiki.mozilla.org/QA/TDAI/Mozmill/Jetmill. But really if you just want to run some tests with an extension installed, then the -p option is easiest.

-Heather

Heather Arthur

unread,
Dec 15, 2009, 4:21:36 PM12/15/09
to mozmi...@googlegroups.com
sorry, the -w option, not the -p option.

Henrik Skupin

unread,
Dec 16, 2009, 8:43:23 AM12/16/09
to mozmi...@googlegroups.com, Heather Arthur
Heather Arthur wrote on 15.12.09 22:21:
> sorry, the -w option, not the -p option.

Why is that called --plugins? We should really differentiate between
plug-ins and add-ons. Those are really different kinds of interfaces.

Ankush

unread,
Dec 16, 2009, 11:12:30 AM12/16/09
to MozMill Developers
Thanks Mikeal, Henrik and Heather.

I am trying to install google toolbar xpi using mozmill -w option. But
it is not being successful.
In the Tools>Addons>Extensions menu, it shows it as installed but I
can not use it.

When I looked into error console, It showed following major errors:

Failed to load XPCOM component: c:\docume~1\ankush\locals~1\temp
\tmpnw6ay3.mozrunner\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}
\components\googletoolbarloader.dll

Warning: Failed to load overlay from chrome://google-toolbar/content/google-toolbar.xul.
Source File: chrome://browser/content/browser.xul

Does anyone have idea about its cause? .
How does -w option work? Does it do unzip or does something extra??
Earlier, I used to just unzip xpi file in extensions folder and then
run mozmill with -p option, It used to work perfectly

PS: google toolbar xpi which I used is available on AMO.

--
Ankush.

Henrik Skupin

unread,
Dec 18, 2009, 1:08:58 PM12/18/09
to mozmi...@googlegroups.com
Ankush wrote on 16.12.09 17:12:

> Failed to load XPCOM component: c:\docume~1\ankush\locals~1\temp
> \tmpnw6ay3.mozrunner\extensions\{3112ca9c-de6d-4884-a869-9855de68056c}
> \components\googletoolbarloader.dll
>
> Warning: Failed to load overlay from chrome://google-toolbar/content/google-toolbar.xul.
> Source File: chrome://browser/content/browser.xul

Looks like you have used the -w option the wrong way. I tried it myself
and everything works fine. I have save the xpi to /data and run:

> mozmill -b /Applications/Namoroka.app -w google_toolbar_for_firefox-5.0.20090324-fx-macosx.xpi

On which platform are you running the tests? Eventually its platform
dependent?

Ankush

unread,
Dec 18, 2009, 3:03:15 PM12/18/09
to MozMill Developers
Hi Henrik,

I tried using newer version of Toolbar and it worked perfectly :).
Earlier I was trying toolbar version 5.0.20090324 and which is failing
even now.
I am running it on Windows XP with Mozmill 1.3 and FF 3.0.16.
I would like to know little bit how -w option work.

But for now problem seems to be solved.

Thanks,
Ankush.

Henrik Skupin

unread,
Dec 18, 2009, 3:06:33 PM12/18/09
to mozmi...@googlegroups.com
Ankush wrote on 18.12.09 21:03:

> I would like to know little bit how -w option work.

I can offer a link to the related source:
http://github.com/whimboo/mozrunner/blob/master/mozrunner/__init__.py#L202

Most of the stuff should be self-explanatory but feel free to ask if you
have questions.

Shriram Kunchanapalli

unread,
Dec 18, 2009, 6:38:11 PM12/18/09
to kalkote...@gmail.com, mozmi...@googlegroups.com
could you try reinstalling mozrunner, mozmill in that order, and see if it fixes the issue with the older version of google toolbar?
could you also mention the command you have used to install the older version?
I wonder if the problem lies with security or permissions with the older version.
Reply all
Reply to author
Forward
0 new messages