Continuous integration goodies in trunk

5 views
Skip to first unread message

Mikeal Rogers

unread,
Oct 26, 2008, 12:12:41 AM10/26/08
to mozmi...@googlegroups.com
We have some very nice goodies available in trunk.

First off, you MUST be using trunk jsbridge as well.

If you run the Python package for mozmill in trunk you'll see a lot of
new options:

$ mozmill --help
Usage: mozmill [options]

Options:
-h, --help show this help message and exit
-s JSBRIDGE_SETTINGS_FILE, --settings=JSBRIDGE_SETTINGS_FILE
Settings file for jsbridge.
-b BINARY, --binary=BINARY
Binary path.
-d DEFAULT-PROFILE, --default-profile=DEFAULT-PROFILE
Default profile path.
-z, --debug Run with firebug, chromebug, venkman, and
jsconsole
-a, --showall Show all back_channel logger output.
-t TEST, --test=TEST Run test file or directory.
-l LOGFILE, --logfile=LOGFILE
Log all events to file.
--show-errors Print logger errors to the console.
--shell Bring up the jsbridge shell. For debugging
only,
incompatible with (-t, --test)

All the events in mozmill are now also pushed to the Python logger
through jsbridge. The new --showall, --show-errors, and --logfile
options all tap in to the Python logger and push out new output.

You'll also notice that you can now pass a testfile to the command
line, in this mode the browser will be killed and the Python shell
will exit when the test is done running. Below is an example of the
output you'll see:

$ mozmill -t /Users/mikeal/Desktop/
test_prefs.js [20:16]
Started ['/Applications/Firefox.app/Contents/MacOS/firefox-bin', '-
profile', '/var/folders/Hs/HsyWzDriHMiGEd1BMyFZiU+++TI/-Tmp-/
tmpjZILv8.mozrunner', '-jsbridge', '24242']
Test Failed : test_PrivacyTab in /Users/mikeal/Desktop/test_prefs.js
Passed 4 :: Failed 1

If failed > 0 the shell will sys.exit(1), so it'll integrate
seamlessly with pretty much any continuous integration system and make
it go red.

A few important notes:

This all uses the new test framework so you'll need to update your
test files a bit. I wrote some new docs here http://code.google.com/p/mozmill/wiki/MozMillTestBasics

DO NOT PUSH OUTPUT TO STDOUT OR A FILE AND THEN PARSE IT. Whatever you
are trying to do you can do it much easier by just writing new
listeners or new Python logger handling, and a new script to kick
things off. More docs to come.

The days of kicking off a script that parses another script and then
parses it's output back in to Python is over. Everything we care about
that happens in the Mozilla Application can now be pushed over to the
Python jsbridge event system and we can keep all the semantics
together in the same interpreter that has a handler on the
application, this will all end up being cleaner and much easier to
maintain.

No, you can't run multiple files at once yet. I've intentionally left
it out until I work out the last few kinks and document it properly so
that nobody becomes dependent on an unstable API.

-Mikeal


Farhad

unread,
Oct 27, 2008, 2:53:35 PM10/27/08
to MozMill Developers
Hi Mikael,
to set up python test enviroment with regards to Momzill, I will be
following page:
https://wiki.mozilla.org/QA/TDAI/MozMillTestTool
instructions. The page contains up-to-date info I am hoping.

Thanks,

Farhad
> test files a bit. I wrote some new docs herehttp://code.google.com/p/mozmill/wiki/MozMillTestBasics

Mikeal Rogers

unread,
Oct 27, 2008, 3:48:11 PM10/27/08
to mozmi...@googlegroups.com
Some of the architecture documentation is outdated.

The checkout and configure instructions for the Python environment all
looks good. You don't have install mozrunner from source, you can just
do

$ easy_install mozrunner

Everything else looks up to date.

Should we move this stuff to the code.google wiki and link it from
this page?

-Mikeal

Reply all
Reply to author
Forward
0 new messages