<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>JGriffin&#039;s Blog &#187; Mozilla</title>
	<atom:link href="http://jagriffin.wordpress.com/category/mozilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://jagriffin.wordpress.com</link>
	<description>Is this thing on?</description>
	<lastBuildDate>Sun, 05 May 2013 21:39:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jagriffin.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>JGriffin&#039;s Blog &#187; Mozilla</title>
		<link>http://jagriffin.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jagriffin.wordpress.com/osd.xml" title="JGriffin&#039;s Blog" />
	<atom:link rel='hub' href='http://jagriffin.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Mozilla A-Team: B2G Test Automation Update</title>
		<link>http://jagriffin.wordpress.com/2012/07/31/mozilla-a-team-b2g-test-automation-update/</link>
		<comments>http://jagriffin.wordpress.com/2012/07/31/mozilla-a-team-b2g-test-automation-update/#comments</comments>
		<pubDate>Tue, 31 Jul 2012 18:57:52 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=184</guid>
		<description><![CDATA[This post describes the status of the various pieces of B2G test automation. Jenkins Continuous Integration We use a Jenkins instance to run continuous integration tests for B2G, using B2G emulators.  Unfortunately, this has been unable to run any tests for several weeks due to incompatibilities between the emulator and the headless Amazon AWS linux [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=184&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This post describes the status of the various pieces of B2G test automation.</p>
<h2>Jenkins Continuous Integration</h2>
<p>We use a Jenkins instance to run continuous integration tests for B2G, using B2G emulators.  Unfortunately, this has been unable to run any tests for several weeks due to incompatibilities between the emulator and the headless Amazon AWS linux VM&#8217;s we have been running the CI on, which have arisen due to the work on hardware acceleration in B2G.  Michael Wu has identified a new VM configuration which does work (Ubuntu 12.04 + Xorg + xorg-video-dummy), and I&#8217;m busy switching our CI over to new VM&#8217;s of this configuration.  The <a href="http://brasstacks.mozilla.com/autolog/?tree=b2g&amp;source=autolog&amp;rev=9a993bef5b1f5acbf7591fce3e6a6cbc918967bf">WebAPI tests are already running again</a>, and the rest will be soon.</p>
<p>As soon as tests are rolling again normally, those of us most closely involved in B2G test automation (myself, Malini Das, Andrew Halberstadt, and Geo Mealer) will institute some informal sheriffing on <a href="http://brasstacks.mozilla.com/autolog/?tree=b2g&amp;source=autolog">Autolog </a>(a TBPL look-alike) to help keep track of test failures.  If you&#8217;d like to help with this effort, let me know.</p>
<h2>Automation Stability</h2>
<p>Our B2G test automation has gone down for weeks at a time on several occasions over the past few months.   Typically this has one of two causes:</p>
<ol>
<li>Changes to B2G which break the emulator.  These are identified fairly quickly, but can take a week or longer to resolve, as they require engineering resources that are busy with other things.  Now that B2G has reached &#8220;feature complete&#8221; stage, it may be that such breaking changes will be less frequent.  Usually, this kind of breakage prevents the emulator from launching successfully, rather than resulting in a build error.  To help identify these more quickly, I will write a simple &#8220;launch the emulator&#8221; test which gets performed after every build; if this test fails, it will automatically message the B2G mailing list.</li>
<li>Changes to non-Marionette code in mozilla-central which break Marionette.  Typically these changes have occurred in the remote debugger, but we&#8217;ve also seen them with JS and browser code.  To address this, we&#8217;re working on getting Marionette unit tests in TBPL using desktop Firefox:  <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=770769">bug 770769</a>.  Once these are live, changes which break Marionette will get caught by try or mozilla-inbound and won&#8217;t be allowed to propagate to mozilla-central where they end up breaking B2G CI.</li>
</ol>
<h2>Test Harness Status</h2>
<p><strong>WebAPI: </strong> running again, 2 intermittent oranges: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=760199">bug 760199</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=779217">bug 779217</a>.</p>
<p><strong>Mochitest:</strong>  will be running soon.  We&#8217;re currently only running the subset of tests that used to be run by Fennec.  We know we want to run all of them, but running all of them results in so many timeouts that the harness aborts.  We&#8217;ll need to spend some time triaging these.  We also know we want to change the way we run mochitests so that we can run them out-of-process: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=777871">bug 777871</a>.</p>
<p><strong>XPCShell tests: </strong> running locally with good results, thanks to Mihnea Balaur, an A-Team intern.  We will add them to the CI after mochitests.</p>
<p><strong>Reftests:</strong>  Andrew Halberstadt has these running locally and is working to understand test failures (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=773482">bug 773842</a>).  He will get them running on a daily basis on a linux desktop with an Nvidia GPU, reporting to the same Autolog instance used by our Jenkins CI.  If we need more frequent coverage and running them on the Amazon VM&#8217;s would provide useful data, we can do that.  The reftest runner also needs to be modified so that it runs tests out-of-process: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=778072">bug 778072</a>.</p>
<p><strong>Eideticker: </strong> Malini Das is working to adapt William Lachance&#8217;s Eideticker harness to B2G.  This will be used to generate frame-rate data for inter- and intra-app transitions.  The testing will be performed on panda boards.  See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=769167">bug 769167</a>.</p>
<p><strong>Other performance tests:</strong>  There are no plans at this time to port talos to B2G.  Malini has written <a href="https://github.com/mozilla-b2g/gaia/tree/master/tests/perf">a simple performance test</a> using Marionette, which tracks the amount of time needed to launch each of the Gaia apps on an emulator.  This has suffered from the same emulator problems described above, and needs to be moved to a new VM.  This test currently reports to a new graphserver system called Datazilla, which isn&#8217;t in production yet.  Once it goes live, we&#8217;ll be able to analyze the data and see whether the current test provides useful data, and what other tests would be useful to write.</p>
<p><strong>Gaia integration tests:</strong>  James Lal has recently added these.  I&#8217;ll hook these up to CI soon.</p>
<h2>Panda Boards</h2>
<p>The emulator is not an ideal test platform for several reasons, most notably poor performance and the fact that it doesn&#8217;t provide the real hardware environment that we care about.  But actual phones are often not good automation targets either; they tend to suffer from problems relating to networking, power consumption, and rebooting that make them a nightmare to deal with in large-scale automation.  Because of this, we&#8217;re going to target panda boards for test automation on real hardware.  This is the same platform that will be used for Fennec automation, so we can leverage a lot of that team&#8217;s work.</p>
<p>There are several things needed for this to happen; see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=777530">bug 777530</a>.  First, we need to get B2G panda builds in production using buildbot; we need to figure out how to flash B2G on pandas remotely; we need to adapt all the testrunners to work with the panda boards; and we need to write mozharness scripts for B2G unit tests, to allow them to work in rel-eng&#8217;s infrastructure.</p>
<p>For reftests, we also need to figure out &#8220;the resolution problem&#8221;:  the fact that we can&#8217;t set the pandas to a resolution that would allow the reftest window to be exactly 800&#215;1000, which is the resolution that test authors assume when writing reftests.  Running reftests at other resolutions is possible, but we don&#8217;t know how many false passes we might be seeing, and analyzing the tests to try and determine this is laborious.</p>
<p>There are a lot of dependencies here, so I don&#8217;t have a very good ETA.  But when this work is done, we will transition all of testing to pandas on rel-eng infrastructure, except for the WebAPI tests which have been written specifically for the emulator.  This means the tests will show up on TBPL; they&#8217;ll be available on try; they will benefit from formal sheriffing. The emulator WebAPI tests will eventually be transitioned to rel-eng as well, if/when rel-eng starts making emulator builds.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=184&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2012/07/31/mozilla-a-team-b2g-test-automation-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>Writing WebAPI tests for B2G using Marionette</title>
		<link>http://jagriffin.wordpress.com/2012/05/04/writing-webapi-tests-for-b2g-using-marionette/</link>
		<comments>http://jagriffin.wordpress.com/2012/05/04/writing-webapi-tests-for-b2g-using-marionette/#comments</comments>
		<pubDate>Fri, 04 May 2012 17:31:20 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[B2G]]></category>
		<category><![CDATA[marionette]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[WebAPI]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=134</guid>
		<description><![CDATA[At Mozilla, we have many different testing frameworks, each of which fills a different niche (although there is definitely some degree of overlap among them). For testing WebAPIs in B2G, some of these existing frameworks can be utilized, depending on the API. For example, mozSettings and mozContacts can be tested using mochitests, since there isn&#8217;t [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=134&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>At Mozilla, we have many different testing frameworks, each of which fills a different niche (although there is definitely some degree of overlap among them). For testing WebAPIs in B2G, some of these existing frameworks can be utilized, depending on the API. For example, mozSettings and mozContacts can be tested using mochitests, since there isn&#8217;t much, if anything, that&#8217;s device-specific to them. (We&#8217;re not currently running mochitests on B2G devices, but will be soon.)</p>
<p>But there are many other WebAPIs which are not testable using any of our standard frameworks, because tests for them need to interact with hardware in interesting ways, and most of our frameworks are designed to operate entirely within a gecko context, and thus have no ability to directly access hardware.</p>
<p>Malini Das and I have been working on a new framework called <a href="https://developer.mozilla.org/en/Marionette">Marionette</a> which can help. Marionette is a remote test driver, so it can remotely execute test steps within a gecko process while retaining the ability to interact with the outside world, including devices running B2G. When this is combined with the B2G emulator&#8217;s ability to query and set hardware state, we have a solution for testing a number of WebAPIs that would be difficult or impossible to test otherwise.</p>
<p>To illustrate how this works, I&#8217;m going to walk through the entire process of writing WebAPI tests for mozBattery and mozTelephony, to be run on B2G emulators. We already have such tests running in continuous integration, reporting to <a href="http://brasstacks.mozilla.com/autolog/?tree=b2g&amp;source=autolog">autolog</a>. If developers add new Marionette WebAPI tests, they will be run and reported here as well. Eventually, they will likely be migrated over to TBPL.</p>
<h2>Building the emulator</h2>
<p>These tests will be run on the emulator, so you&#8217;ll have to build the B2G Ice Cream Sandwich emulator first, if you don&#8217;t have one already.  You&#8217;ll need to do this on linux, preferably Ubuntu.  Make sure to install the <a href="https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Setting_Up_Boot_to_Gecko_Build_Environment#Installing_the_build_dependencies">build prerequisites</a> before you begin, if you haven&#8217;t built B2G before.</p>
<pre>git clone <a href="https://github.com/andreasgal/B2G">
https://github.com/andreasgal/B2G
</a>
cd B2G
make sync (get a cup of coffee, this takes quite a while)
make config-qemu-ics (get another cup of coffee)
make gonk (get another drink, but I think you've had enough coffee by now)
make</pre>
<p>You should now have an emulator, which can you launch using:</p>
<pre>./emu-ics.sh</pre>
<p>After you&#8217;ve verified the emulator is working, close it again.</p>
<h2>Running a Marionette sanity test</h2>
<p>Now we&#8217;ll run a single Marionette test to verify that everything is working as expected.   First, ensure that you have Python 2.7 on your system.  Then, install some prerequisites:</p>
<pre>pip install (or easy_install) manifestdestiny
pip install (or easy_install) mozhttpd
pip install (or easy_install) mozprocess</pre>
<p>Now, from the directory where you cloned the B2G repo:</p>
<pre>cd gecko/testing/marionette/client/marionette
python runtests.py --emulator --homedir /path/to/B2G/repo \
  tests/unit/test_simpletest_sanity.py</pre>
<p>If everything has gone well, you should see something like the following:</p>
<pre>TEST-START test_simpletest_sanity.py
test_is (test_simpletest_sanity.SimpletestSanityTest) ... ok
test_isnot (test_simpletest_sanity.SimpletestSanityTest) ... ok
test_ok (test_simpletest_sanity.SimpletestSanityTest) ... ok

----------------------------------------------------------------------
Ran 3 tests in 2.952s

OK

SUMMARY
-------
passed: 3
failed: 0
todo: 0</pre>
<h2></h2>
<h2>Writing a battery test</h2>
<p>The B2G emulator allows you to arbitrarily set the battery level and charging state, by telnetting into the emulator&#8217;s console port and issuing certain commands.  Marionette has an <a href="https://github.com/mozilla/marionette_client/blob/master/marionette/emulator_battery.py">EmulatorBattery</a> class which abstracts these operations, and allows you to interact with the emulator&#8217;s battery using a very simple API.</p>
<p>A simple example is given in the <a href="https://developer.mozilla.org/en/Marionette/EmulatorBattery#Example">EmulatorBattery documentation on MDN</a>.  Save this example to a file named test_battery_example.py, and run this command:</p>
<pre>python runtests.py --emulator --homedir /path/to/B2G/repo /path/to/test_battery_example.py</pre>
<p>Marionette should launch an emulator and run the test; when it&#8217;s done you should see:</p>
<pre>TEST-START test_battery_example.py
test_level (test_battery_example.TestBatteryLevel) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.391s

OK

SUMMARY
-------
passed: 1
failed: 0
todo: 0</pre>
<h4>How it works</h4>
<p>This test, like all Marionette Python tests, is written using <a href="http://docs.python.org/library/unittest.html">Python&#8217;s unittest framework</a>, which provides the assert methods used in the test.  Other methods used by the test are provided by the <a href="https://developer.mozilla.org/en/Marionette/Marionette/">Marionette </a>and <a href="https://developer.mozilla.org/en/Marionette/EmulatorBattery">EmulatorBattery</a> classes.</p>
<p>When the test executes this line:</p>
<pre>self.marionette.emulator.battery.level = 0.25</pre>
<p>the EmulatorBattery class telnets into the emulator and sets the battery&#8217;s level.  We then read the level back (which invokes another telnet command) to verify that the emulator&#8217;s battery state was updated as expected.  And finally, we execute a snippet of JavaScript inside gecko:</p>
<pre>moz_level = self.marionette.execute_script("return navigator.mozBattery.level;")</pre>
<p>and verify that it returns the same battery level as the emulator is reporting directly.</p>
<h2>More tests with hardware interaction</h2>
<p>In addition to battery interaction, the B2G emulator allows you to query and set the state of other properties normally set by hardware, like GPS location, network status, and various sensors.  Tests for all these could be written in a similar way.  It probably makes sense to make classes for these similar to EmulatorBattery which abstract the details of getting and setting the state of the underlying hardware.  I would encourage WebAPI developers to add as many WebAPI tests as possible; if you would like us to add convenience classes, please ping us on IRC (jgriffin and mdas, on #ateam or #b2g) or<a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&amp;component=Marionette"> file a bug under Testing:Marionette</a>.</p>
<h2>Multi-emulator tests</h2>
<p>There are some WebAPIs which cannot be completely tested using  a single device or emulator, like telephony and SMS.  Marionette can help with these too, as Marionette can be used to manipulate two emulator instances which are capable of communicating with each other.</p>
<p>In any tests run with the <code>--emulator</code> switch, Marionette launches an emulator before running the tests, and this emulator is associated with an instance of the <code>Marionette </code>class available to the test as <code>self.marionette</code>. Tests can invoke a second emulator instance using <code>self.get_new_emulator()</code>, and these emulator instances can call and text each other using their port numbers as their phone numbers.</p>
<p>To illustrate how this works, Malini has written an example test in which one emulator is used to dial another, and the caller&#8217;s number is verified on the receiver. See this example at <a href="https://developer.mozilla.org/en/Marionette/Marionette_Python_Tests/Emulator_Integrated_Tests#Manage_Multiple_Emulators"><br />
https://developer.mozilla.org/en/Marionette/Marionette_Python_Tests/Emulator_Integrated_Tests#Manage_Multiple_Emulators<br />
</a>.</p>
<p>If you save this example to test_dial_example.py and run the command:</p>
<pre>python runtests.py --emulator --homedir /path/to/B2G/repo /path/to/test_dial_example.py</pre>
<p>you should see Marionette launch one emulator, and then after it starts execution of the test, you should see a second emulator instance launch. After the test is done, you should see a successful report, similar to the one shown for the battery test.</p>
<p>We currently have a <a href="http://mxr.mozilla.org/mozilla-central/source/dom/telephony/test/marionette/">few tests for mozTelephony</a>, but many more could be added, and new tests should be added for SMS/MMS as well.</p>
<h2>Adding new tests to the B2G continuous integration</h2>
<p>When new test are ready to be added to the CI, they should be checked into gecko under their dom component, e.g., <code>dom/telephony/test/marionette</code>. They should be added to the <code>manifest.ini</code> file in the same directory, and then for new manifest.ini files, the path to the .ini file should be added to the master manifest at <a href="http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/tests/unit-tests.ini"><br />
http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/tests/unit-tests.ini<br />
</a>. After this is done, it should be picked up by the B2G CI, <strong>after </strong>the gecko fork of B2G is updated, where it will be reported along with the other tests to <a href="http://brasstacks.mozilla.com/autolog/?tree=b2g&amp;source=autolog">autolog</a>.</p>
<h2>Caveats, provisos, and miscellanea</h2>
<p>B2G builds go to sleep after 60 seconds of inactivity.  In the emulator, this &#8220;sleep&#8221; will completely lock up Marionette if it occurs while a test is running.  This is very inconvenient while testing.  See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=739476">bug 739476</a>. Until some better mechanism of handling this is available, I usually edit <code>gecko/b2g/apps/b2g.js</code> to increase the value of the <code>power.screen.timeout</code> pref before building, to prevent the emulator from going to sleep.</p>
<p>The current test failures in autolog are being tracked as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=751403">bug 751403</a> and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=751406">bug 751406</a>.</p>
<p>Network access in the emulator currently doesn&#8217;t seem to work (see <a href="https://github.com/andreasgal/B2G/issues/287"><br />
https://github.com/andreasgal/B2G/issues/287<br />
</a>).  This prevents some parts of Gaia from working correctly but doesn&#8217;t interfere with the above style of WebAPI tests, none of which rely on Gaia or network access.</p>
<p>Building the emulator is very time-consuming, mostly due to the time required to sync all the various repos needed by B2G.  We hope to be able to post emulator builds for download soon, after a few details are worked out.</p>
<h2>More reading</h2>
<p><a href="https://developer.mozilla.org/en/Marionette">What is Marionette</a></p>
<p><a href="https://developer.mozilla.org/en/Marionette/Marionette_Python_Tests">Marionette Python tests</a></p>
<p><a href="https://developer.mozilla.org/en/Marionette/Marionette_Python_Tests/Emulator_Integrated_Tests">Marionette Emulator tests</a></p>
<p><a href="https://developer.mozilla.org/en/Marionette/Marionette">the Marionette class</a></p>
<p><a href="https://developer.mozilla.org/en/Marionette/Emulator">the Emulator class</a></p>
<h2>Please contribute tests</h2>
<p>There are many WebAPIs which are less tested than they could be.  Please help us expand test coverage by contributing tests in areas similar to those described above.    If you need help, contact :jgriffin or :mdas on IRC, or file a bug under <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&amp;component=Marionette">Testing:Marionette</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=134&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2012/05/04/writing-webapi-tests-for-b2g-using-marionette/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>B2G and WebAPI testing in Emulators</title>
		<link>http://jagriffin.wordpress.com/2011/11/14/b2g-and-webapi-testing-in-emulators/</link>
		<comments>http://jagriffin.wordpress.com/2011/11/14/b2g-and-webapi-testing-in-emulators/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 21:12:36 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=101</guid>
		<description><![CDATA[Malini Das and I have been working on a new test framework called Marionette, in which tests of a Gecko-based product (B2G, Fennec, etc.) are driven remotely, ala Selenium.  Marionette has client and server components; the server side is embedded inside Gecko, and the client side runs on a (possibly remote) host PC.  The two [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=101&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Malini Das and I have been working on a new test framework called <a href="https://wiki.mozilla.org/Auto-tools/Projects/Marionette">Marionette</a>, in which tests of a Gecko-based product (B2G, Fennec, etc.) are driven remotely, ala Selenium.  Marionette has client and server components; the server side is embedded inside Gecko, and the client side runs on a (possibly remote) host PC.  The two components communicate using a JSON protocol over a TCP socket.  The <a href="https://wiki.mozilla.org/Auto-tools/Projects/Marionette/JSON_Protocol">Marionette JSON protocol</a> is based loosely on the <a href="http://code.google.com/p/selenium/wiki/JsonWireProtocol">Selenium JSON Wire Protocol</a>; it defines a set of commands that the Marionette server inside Gecko knows how to execute.</p>
<p>This differs from past approaches to remote automation in that we don&#8217;t need any extra software (i.e., a SUTAgent) running on the device, we don&#8217;t need special access to the device via something like adb (although we do use adb to manage <a href="http://developer.android.com/guide/developing/devices/emulator.html">emulators</a>), nor do tests need to be particularly browser-centric.  These differences seem advantageous when thinking about testing B2G.</p>
<p>The first use case to which we might apply Marionette in B2G seems to be WebAPI testing in emulators.  There are some WebAPI features that we can&#8217;t test well in an automated manner using either desktop builds or real devices, such as <a href="https://wiki.mozilla.org/WebAPI/WebSMS">WebSMS</a>.  But we can write automated tests for these using emulators, since we can manipulate the emulator&#8217;s hardware state and emulators know how to &#8220;talk&#8221; to each other for the purposes of SMS and telephony.</p>
<p>Since Marionette tests are driven from the client side, they&#8217;re written in Python.  This is what a WebSMS test in Marionette might look like:</p>
<pre class="brush: python; title: ; notranslate">
from marionette import Marionette

if __name__ == '__main__':
    # launch the emulators that will do the sending and receiving
    sender = Marionette(emulator=True)
    assert(sender.emulator.is_running)
    assert(sender.start_session())

    receiver = Marionette(emulator=True)
    assert(receiver.emulator.is_running)
    assert(receiver.start_session())

    # setup the SMS event listener on the receiver
    receiver.execute_script(&quot;&quot;&quot;
        var sms_body = &quot;&quot;;
        window.addEventListener(&quot;smsreceived&quot;,
                                 function(m) { sms_body = m.body });

    &quot;&quot;&quot;)

    # send the SMS event on the sender
    message = &quot;hello world!&quot;
    sender.execute_script(&quot;navigator.sms.send(%d, '%s');&quot; %
        (receiver.emulator.port, message))

    # verify the message was received by the receiver
    assert(receiver.execute_script(&quot;return sms_body;&quot;) == message)

</pre>
<p>The JavaScript portions of the test could be split into a separate file from the Python, for easier editing and syntax highlighting.  Here&#8217;s the adjusted Python file:</p>
<pre class="brush: python; title: ; notranslate">
from marionette import Marionette

if __name__ == '__main__':
    # launch the emulators that will do the sending and receiving and
    # load the JS scripts for each
    sender = Marionette(emulator=True)
    assert(sender.emulator.is_running)
    assert(sender.start_session())
    assert(sender.load_script('test_sms.js'))

    receiver = Marionette(emulator=True)
    assert(receiver.emulator.is_running)
    assert(receiver.start_session())
    assert(receiver.load_script('test_sms.js'))

    # setup the SMS event listener on the receiver
    receiver.execute_script_function(&quot;setup_sms_listener&quot;)

    # send the SMS event on the sender
    message = &quot;hello world!&quot;
    target = receiver.emulator.port
    sender.execute_script_function(&quot;send_sms&quot;, [target, message])

    # verify the message was received by the receiver
    assert(receiver.execute_script_function(&quot;get_sms_body&quot;) == message)

</pre>
<p>And here&#8217;s the JavaScript file:</p>
<pre class="brush: jscript; title: ; notranslate">
function send_sms(target, msg) {
    navigator.sms.send(target, msg);
}

var sms_body = &quot;&quot;;

function setup_sms_listener() {
    window.addEventListener(&quot;smsreceived&quot;,
                            function(m) { sms_body = m.body });
}

function get_sms_body() {
    return sms_body;
}

</pre>
<p>Both of these options are just about usable in Marionette right now.  Note that the test is driven, and some of the test logic (like asserts) resides on the client side, in Python.  This makes synchronization between multiple emulators straightforward, and provides a natural fit for Python libraries that will be used to interact with the emulator&#8217;s battery and other hardware.</p>
<p>What if we wanted JavaScript-only WebAPI tests in emulators, without any Python?  Driving a multiple-emulator test from JavaScript running in Gecko introduces some complications, chief among them the necessity of sharing state between the tests, the emulators, and the Python testrunner, all from within the context of the JavaScript test.  We can imagine such a test might look like this:</p>
<pre class="brush: jscript; title: ; notranslate">

var message = &quot;hello world!&quot;;
var device_number = Marionette.get_device_number(Marionette.THIS_DEVICE);

if (device_number == 1) {
  // we're being run in the &quot;sender&quot;

  // wait for the test in the other emulator to be in a ready state
  Marionette.wait_for_state(Marionette.THAT_DEVICE, Marionette.STATE_READY);

  // send the SMS
  navigator.sms.send(Marionette.get_device_port(Marionette.THAT_DEVICE), message);
}
else {
  // we're being run in the &quot;receiver&quot;

  // notify Marionette that this test is asynchronous
  Marionette.test_pending();

  // setup the event listener
  window.addEventListener(&quot;smsreceived&quot;,
                          function (m) { 
                                         // perform the test assertion and notify Marionette 
                                         // that the test is finished
                                         is(m.body, message, &quot;Wrong message body received&quot;); 
                                         Marionette.test_finished();
                                       }
                         );

  // notify Marionette we're in a ready state
  Marionette.set_state(Marionette.STATE_READY);
}

</pre>
<p>Conceptually, this is more similar to xpcshell tests, but implementing support for this kind of test in Marionette (or inside the existing xpcshell harness) would require substantial additional work.  As it currently exists, Marionette is designed with a client-server architecture, in which information flows from the client (the Python part) to the server (inside Gecko) using TCP requests, and then back.  Implementing the above JS-only test syntax would require us to implement the approximate reverse, in which requests could be initiated at will from within the JS part of the test, and this would require non-trivial changes to Marionette in several different areas, as well as requiring new code to handle the threading and synchronization that would be required.</p>
<p>Do you think the Python/JS hybrid tests will be sufficient for WebAPI testing in emulators?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=101&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/11/14/b2g-and-webapi-testing-in-emulators/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>OrangeFactor changes: Talos, bug correlations</title>
		<link>http://jagriffin.wordpress.com/2011/10/03/orangefactor-changes-talos-bug-correlations/</link>
		<comments>http://jagriffin.wordpress.com/2011/10/03/orangefactor-changes-talos-bug-correlations/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 21:54:10 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=95</guid>
		<description><![CDATA[Talos oranges now in OrangeFactor When OrangeFactor (aka WOO) premiered, it did not include Talos oranges in its calculations.  There were many reasons for this, including the fact that Talos oranges were quite rare at the time. As philor noted last week, that is no longer the case; there are now several frequent Talos oranges [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=95&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h3>Talos oranges now in OrangeFactor</h3>
<p>When <a href="http://brasstacks.mozilla.com/orangefactor/">OrangeFactor</a> (aka WOO) premiered, it did not include Talos oranges in its calculations.  There were many reasons for this, including the fact that Talos oranges were quite rare at the time.</p>
<p>As philor noted last week, that is no longer the case; there are now several frequent Talos oranges on the Android platform.  Because of this, I&#8217;ve just added Talos oranges into OrangeFactor.  The result is that the OrangeFactor has jumped from 4.01 (678 failures in 169 testruns) to 5.44 (921 failures in 169 testruns) on mozilla-central.</p>
<h3>New bug correlations view</h3>
<p>Mark Côté has recently implemented a new view in OrangeFactor, the <a href="http://brasstacks.mozilla.com/orangefactor/?display=Correlations&amp;tree=mozilla-inbound&amp;endday=2011-10-03&amp;startday=2011-09-05">bug correlations view</a>.  This view shows bugs which occur together on the same commit.  We&#8217;ve already had a couple of suggestions for this page which we&#8217;re going to implement:  add bug summaries, and show the actual revision numbers for the correlations.  If anyone has other suggestions, please file a bug under <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&amp;component=Orange%20Factor">Testing:Orange Factor</a>.</p>
<h3>Upcoming changes</h3>
<p>Next up:  adding the ability to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=669316">guess when an orange was introduced</a>.  Stay tuned!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=95&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/10/03/orangefactor-changes-talos-bug-correlations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>GoFaster:  deeper data analysis</title>
		<link>http://jagriffin.wordpress.com/2011/09/06/gofaster-deeper-data-analysis/</link>
		<comments>http://jagriffin.wordpress.com/2011/09/06/gofaster-deeper-data-analysis/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 23:50:41 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=78</guid>
		<description><![CDATA[For the GoFaster project, releng and the A-team have been working on various tasks which we hope will result in getting the total commit to all-tests-done time down to 2 hours for the main branches (try excluded).   This total turnaround time was 6-8 hours a couple of months ago when we began this project. We&#8217;ve [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=78&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For the <a href="https://wiki.mozilla.org/ReleaseEngineering/BuildFaster">GoFaster project</a>, releng and the A-team have been working on various tasks which we hope will result in getting the total commit to all-tests-done time down to 2 hours for the main branches (try excluded).   This total turnaround time was 6-8 hours a couple of months ago when we began this project.</p>
<p>We&#8217;ve recently made some improvements that seriously reduce the total machine time required to run all tests for a given commit.  These include <a href="http://jagriffin.wordpress.com/2011/08/09/gofaster-hiding-the-mochitest-results-table/">hiding the mochitest results table</a>, <a href="http://nakubu.com/post/28">removing packed.js from mochitest</a>, and streamlining individual slow tests (see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=674738">bug 674738</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=676412">bug 676412</a>, and <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=670229">bug 670229</a>).  These together have reduced the total machine time for test down from about 40 hours to around 25 hours per commit, a big win.</p>
<p>However, the total turnaround times are still much slower than our goal:</p>
<p><a href="http://jagriffin.files.wordpress.com/2011/09/e2e1.png"><img class="alignnone size-full wp-image-91" title="e2e" src="http://jagriffin.files.wordpress.com/2011/09/e2e1.png?w=630" alt=""   /></a></p>
<p>We already knew that PGO builds are slow, and jhford is working on turning on-demand builds into non-PGO builds, and make PGO builds every four hours (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=658313">bug 658313</a>).  However, we needed a way to dig deeper into the data to see what our other pain points are.</p>
<p>Will Lachance made some <a href="http://brasstacks.mozilla.com/gofaster/#/buildcharts">awesome build charts</a> which help us visualize what&#8217;s going on in these buildbot jobs.  Clicking any commit will show a chart that displays all the relevant buildbot jobs in relative clock time; this makes it easier to see where the bottlenecks are.</p>
<h2>Build times</h2>
<p>Display the build chart for just about any commit (<a href="http://brasstacks.mozilla.com/gofaster/buildchart.html?buildid=98808cfd49274d5fa51efdf56469c992">e58e98a89827</a> for instance), and you&#8217;ll see the problem right away:  just about every commit includes builds that far exceed 2 hours.  These aren&#8217;t always opt builds, and they sometimes occur even on our &#8216;fast&#8217; OS:  linux.  Check out <a href="http://brasstacks.mozilla.com/gofaster/buildchart.html?buildid=4ee29da6a0b347119e7f9540066a9318">5d9989c3bff6</a>, which has a linux64 opt build that takes 214 min, compared to the linux32 opt build that takes 61 minutes.  <a href="http://brasstacks.mozilla.com/gofaster/buildchart.html?buildid=fa7cceff224c4b95ab1846d3a812b950">198c7de0699d</a> has an OSX 10.5 debug build that takes 171 minutes, but the 10.6 debug build takes only 82 minutes.  Clearly, we can&#8217;t hit our 2-hour goal with builds that take 2+ hours.  What&#8217;s going on?</p>
<p>It&#8217;s necessary to spend a little time digging through build logs to find out.  It turns out there are multiple factors.</p>
<ol>
<li>We already know that PGO builds are slow, particularly on Windows.  Once <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=658313">bug 658313</a> lands, we expect the overall situation to improve dramatically.</li>
</ol>
<ol start="2">
<li>On some builds, the &#8216;update&#8217; step includes a full &#8216;hg clone&#8217; of mozilla-central, while others use &#8216;hg pull -u&#8217;.  Below is a graph of update times; the average time for an update that includes &#8216;hg clone&#8217; is 12.9 min, for those that use &#8216;hg pull&#8217; the average is 0.6 min.  Each full clone is costing us an average of 12 minutes.</li>
</ol>
<p><a href="http://jagriffin.files.wordpress.com/2011/09/update_times.png"><img class="alignnone size-full wp-image-86" title="update_times" src="http://jagriffin.files.wordpress.com/2011/09/update_times.png?w=630" alt=""   /></a></p>
<ol start="3">
<li>On some build slaves, we do a full build (with no obj dir from a previous build), on others we do an incremental build.   Below is a graph showing incremental vs full compile times for opt and debug builds.   On average, full compiles are taking 17 minutes longer than incremental ones.</li>
</ol>
<p><a href="http://jagriffin.files.wordpress.com/2011/09/compile_times.png"><img class="alignnone size-full wp-image-87" title="compile_times" src="http://jagriffin.files.wordpress.com/2011/09/compile_times.png?w=630" alt=""   /></a></p>
<ol start="4">
<li>We have a mix of slow and fast slaves.  This can easily be seen in the below graph of linux compile times.  On linux and linux64 builds, full compiles with moz2-linux(64)-* slaves are slow (those &gt; 75 min), while those made with linux(64)-ix-* slaves are fast (those &lt; 75 min).  32-bit mac builds show a similar split, with those on moz2-darwin9* slaves slow, and those on bm-xserve* slaves fast.  Hardware doesn&#8217;t appear to create a significant difference for windows and 64-bit mac builds.</li>
</ol>
<p><a href="http://jagriffin.files.wordpress.com/2011/09/fast_vs_slow.png"><img class="alignnone size-full wp-image-88" title="fast_vs_slow" src="http://jagriffin.files.wordpress.com/2011/09/fast_vs_slow.png?w=630" alt=""   /></a></p>
<ol start="5">
<li>On macosx64 machines, the &#8216;alive test&#8217; step takes an average of 6 min (vs 1 min on other os&#8217;s).</li>
<li>The &#8216;checking clobber times&#8217; step often takes just a couple of seconds, however when this step actually results in some clobbering being done, it can take up to 21 minutes (average: 6 min).</li>
</ol>
<p>When all these factors coincide, we can get builds (which include compile, update, and other steps) that exceed 4 hours.  This suggests doing away with on-demand PGO builds may not in itself get us to our 2-hour goal.</p>
<p>From this data, two of the more obvious ways to improve our build times might be:</p>
<ol>
<li>Investigate retiring slow linux and 32-bit mac build slaves.</li>
<li>Investigate ways to reduce clobbering.  Clobbering itself takes time (see bullet #6 above), but also indirectly costs time through increased update and compile times.  Currently, about 51% of our builds are operating on clobbered slaves, requiring full hg clones and full compiles.  If this number could be reduced, we might see a significant reduction in our average turnaround times.</li>
</ol>
<h2>Test times</h2>
<p>According to Will&#8217;s build charts, the E2E time for tests is often within our 30-minute target range.  The exception is mochitest-other on debug builds, which often takes from 60 to 90 minutes.  We could improve this situation somewhat by splitting mochitest-browser-chrome (the longest-running chunk of mochitest-other) into its own test job.</p>
<p>Additionally, wait times for test slaves running android and win 7 tests is sometimes non-trivial; see e.g. the details for commit <a href="http://brasstacks.mozilla.com/gofaster/buildchart.html?buildid=4886ddf5eb4e4af7be2d1c219245ada2">97216ae0fc04</a>.  We should try to understand why this happens; the graph of test wait times doesn&#8217;t show a clear trend, other than highlighting the fact that wait times for windows and android are usually worse than the other os&#8217;s.</p>
<p><a href="http://jagriffin.files.wordpress.com/2011/09/test_waits.png"><img class="alignnone size-full wp-image-92" title="test_waits" src="http://jagriffin.files.wordpress.com/2011/09/test_waits.png?w=630" alt=""   /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=78&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/09/06/gofaster-deeper-data-analysis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2011/09/e2e1.png" medium="image">
			<media:title type="html">e2e</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2011/09/update_times.png" medium="image">
			<media:title type="html">update_times</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2011/09/compile_times.png" medium="image">
			<media:title type="html">compile_times</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2011/09/fast_vs_slow.png" medium="image">
			<media:title type="html">fast_vs_slow</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2011/09/test_waits.png" medium="image">
			<media:title type="html">test_waits</media:title>
		</media:content>
	</item>
		<item>
		<title>GoFaster:  hiding the mochitest results table</title>
		<link>http://jagriffin.wordpress.com/2011/08/09/gofaster-hiding-the-mochitest-results-table/</link>
		<comments>http://jagriffin.wordpress.com/2011/08/09/gofaster-hiding-the-mochitest-results-table/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 17:21:28 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=74</guid>
		<description><![CDATA[I&#8217;m sure anyone who has ever submitted a patch to a Mozilla tree is familiar with this drill: hg push check TBPL, wait check TBPL again, wait some more go to Starbucks for a caramel macchiato, install a new OS on your laptop, review all the patches in your queue, plan next winter&#8217;s tropical vacation, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=74&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m sure anyone who has ever submitted a patch to a Mozilla tree is familiar with this drill:</p>
<ol>
<li>hg push</li>
<li>check TBPL, wait</li>
<li>check TBPL again, wait some more</li>
<li>go to Starbucks for a caramel macchiato, install a new OS on your laptop, review all the patches in your queue, plan next winter&#8217;s tropical vacation, check TBPL, and&#8230;.</li>
<li>wait some more</li>
</ol>
<p>Recently, the total end-to-end time from submit to all-tests-done has been around 6-8 hours, depending on load.  That&#8217;s too long, and RelEng and the A-Team think we can do something about it.  For the past couple of months we&#8217;ve been working on the GoFaster project; our goal is to get that turnaround time down to 2 hours.  We have a <a href="https://bugzilla.mozilla.org/buglist.cgi?list_id=743687&amp;resolution=---&amp;status_whiteboard_type=allwordssubstr&amp;query_format=advanced&amp;status_whiteboard=buildfaster:p">list of tasks</a>, and recently one of these landed with some significant improvements.</p>
<p>Cameron McCormack wrote a patch which hides the mochitest results table when MOZ_HIDE_RESULTS_TABLE=1 (see: <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=479352">bug 479352</a>).  The initial version of this patch caused frequent hangs during mochitest-1/5.  We didn&#8217;t discover the reason behind this, but  I updated the patch to hide the result table in a different way, and the hang vanished.  I pushed this change to mozilla-central, and Cameron made <a href="http://mcc.id.au/temp/2011/times2.html">a table</a> displaying before and after durations for all the test runs.</p>
<p>The results?  That one change saves about 13 hours of machine time <em>per checkin</em>.  The entire suite of unit tests which prior to that change took about 40 machine-hours to run now takes 27.  Wow!</p>
<p>What kind of improvement in the end-to-end time does that translate into?  I&#8217;m not sure.  Sam Liu, an A-Team intern, has been working on a dashboard to help track this, but it&#8217;s currently using canned (stale) data.  RelEng is working on exposing live data to be consumed by the dashboard, and when that&#8217;s ready we should be able to easily track the effect of changes like this in the overall time.</p>
<p>Meanwhile, check out <a href="https://wiki.mozilla.org/ReleaseEngineering/BuildFaster">the project&#8217;s wiki page</a> or attend <a href="https://wiki.mozilla.org/ReleaseEngineering/BuildFaster#Meetings">one of our meetings</a>.  If you have thoughts on ways we can improve our total turnaround time, we&#8217;d love to hear from you.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=74&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/08/09/gofaster-hiding-the-mochitest-results-table/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>WebGL Conformance Tests now in GrafxBot</title>
		<link>http://jagriffin.wordpress.com/2011/03/07/webgl-conformance-tests-now-in-grafxbot/</link>
		<comments>http://jagriffin.wordpress.com/2011/03/07/webgl-conformance-tests-now-in-grafxbot/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 22:36:15 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=56</guid>
		<description><![CDATA[GrafxBot has been updated to include the mochitest version of the WebGL Conformance Tests.  When you run GrafxBot tests using the new version, it will run the usual reftests first, followed by the new WebGL tests.  Both sets of test results are posted to the database at the end of test. The WebGL tests may [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=56&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>GrafxBot has been updated to include the mochitest version of the <a href="http://www.khronos.org/webgl/wiki/Testing/Conformance">WebGL Conformance Tests</a>.  When you run GrafxBot tests using the new version, it will run the usual reftests first, followed by the new WebGL tests.  Both sets of test results are posted to the database at the end of test.</p>
<p>The WebGL tests may be skipped for a couple of reasons:  they&#8217;ll be skipped if you have a <a href="http://mxr.mozilla.org/mozilla-central/source/content/canvas/test/webgl/test_webgl_conformance_test_suite.html?force=1#329">Mac running less than 10.6</a>, or if WebGL isn&#8217;t enabled in Firefox on your machine, which could happen if you don&#8217;t have supported hardware or drivers.  GrafxBot doesn&#8217;t try to force-enable either WebGL or accelerated layers.</p>
<p>Partially to support these tests, GrafxBot now reports some additional details about Firefox&#8217;s acceleration status, similar to what you see in about:support:</p>
<table style="border:solid 1px black;margin-bottom:2em;border-collapse:collapse;">
<tbody>
<tr>
<td style="text-align:right;background-color:lightgray;border:solid 1px black;padding:4px;">webgl results</td>
<td style="border:solid 1px black;padding:4px;">132 pass / 7 fail</td>
</tr>
<tr>
<td style="text-align:right;background-color:lightgray;border:solid 1px black;padding:4px;">webgl renderer</td>
<td style="border:solid 1px black;padding:4px;">Google Inc. &#8212; ANGLE &#8212; OpenGL ES 2.0 (ANGLE 0.0.0.541)</td>
</tr>
<tr>
<td style="text-align:right;background-color:lightgray;">acceleration mode</td>
<td style="border:solid 1px black;padding:4px;">2/2 Direct3D 10</td>
</tr>
<tr>
<td style="text-align:right;background-color:lightgray;border:solid 1px black;padding:4px;">d2d enabled</td>
<td style="border:solid 1px black;padding:4px;">true</td>
</tr>
<tr>
<td style="text-align:right;background-color:lightgray;border:solid 1px black;padding:4px;">directwrite enabled</td>
<td style="border:solid 1px black;padding:4px;">true: 6.1.7600.20830, font cache n/a</td>
</tr>
</tbody>
</table>
<p>I encourage users to download and run the new version; I&#8217;d like to get some feedback before I update it on AMO, to make sure users aren&#8217;t running into problems with the new tests.</p>
<p>The new version of GrafxBot can be <a href="http://people.mozilla.org/~jgriffin/grafxbot-0.2.00.xpi">downloaded here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=56&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/03/07/webgl-conformance-tests-now-in-grafxbot/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>Latest Tinderbox Build URL&#8217;s</title>
		<link>http://jagriffin.wordpress.com/2011/02/24/latest-tinderbox-build-urls/</link>
		<comments>http://jagriffin.wordpress.com/2011/02/24/latest-tinderbox-build-urls/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 17:57:06 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=52</guid>
		<description><![CDATA[The automation tools team creates a variety of automation tools that test a wide range of things.  There are times when these tools need to locate the latest tinderbox build for a given platform, in order to test against.  In the past, this task involved spidering along the FTP site that is home to tinderbox [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=52&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The automation tools team creates a variety of automation tools that test a wide range of things.  There are times when these tools need to locate the latest tinderbox build for a given platform, in order to test against.  In the past, this task involved spidering along the <a href="http://stage.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/">FTP site</a> that is home to tinderbox builds.</p>
<p>Now, however, there&#8217;s a much easier way:  a web service which returns a JSON document that always contains the latest tinderbox build url&#8217;s for all platforms.  This is made possible by Christian Legnitto&#8217;s awesome <a href="http://pulse.mozilla.org/">Mozilla Pulse</a>, which sends messages to consumers when certain buildbot events (among other things) occur.  I&#8217;ve written a Python library, <a href="http://hg.mozilla.org/automation/pulsebuildmonitor">pulsebuildmonitor</a>, which makes it even easier to act as a consumer for these messages, and layered a small web service on top of that.</p>
<p>The result is <a href="http://brasstacks.mozilla.com/latestbuilds/README"><br />
http://brasstacks.mozilla.com/latestbuilds/README<br />
</a>, or get the actual JSON at <a href="http://brasstacks.mozilla.com/latestbuilds/"><br />
http://brasstacks.mozilla.com/latestbuilds/<br />
</a>.</p>
<p>Currently this only works for mozilla-central, but I could easily extend it to other trees if needed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=52&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/02/24/latest-tinderbox-build-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>
	</item>
		<item>
		<title>ProfileManager 1.0_beta1</title>
		<link>http://jagriffin.wordpress.com/2011/01/11/profilemanager-1-0_beta1/</link>
		<comments>http://jagriffin.wordpress.com/2011/01/11/profilemanager-1-0_beta1/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 02:18:54 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=47</guid>
		<description><![CDATA[ProfileManager is a standalone app that can be used to manage profiles for Firefox and other xulrunner apps. The profile manager which is built into Firefox is going away after 4.0, so this new app will be the best choice for managing profiles in future Firefox versions, but it works great with 4.0 and earlier [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=47&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>ProfileManager is a standalone app that can be used to manage profiles for Firefox and other xulrunner apps.  The profile manager which is built into Firefox is going away after 4.0, so this new app will be the best choice for managing profiles in future Firefox versions, but it works great with 4.0 and earlier versions as well, not to mention Thunderbird.</p>
<p>Some of its features:</p>
<ul>
<li>easy profile backup and restore</li>
<li>ability to save/restore profiles to zip archives (which makes it easy to move them between machines)</li>
<li>ability to manage multiple versions of Firefox, and associate profiles with specific Firefox versions</li>
<li>allows user to launch any profile with any version of Firefox installed on his system, as shown in the graphic below</li>
</ul>
<p><img class="alignnone size-medium wp-image-49" title="ProfileManager" src="http://jagriffin.files.wordpress.com/2011/01/capture.png?w=630" alt="" /></p>
<p>You can download a build of the 1.0_beta1 version from <a href="ftp://ftp.mozilla.org/pub/utilities/profilemanager/1.0_beta1/">ftp://ftp.mozilla.org/pub/utilities/profilemanager/1.0_beta1/</a>.  Myself and the others who have worked on this (principally Jeffrey Hammel and Mark Côté) would love feedback; feel free to leave comments or file a <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&amp;component=ProfileManager">bugzilla bug</a> if you find problems.</p>
<p><em>Note</em>: by default, ProfileManager works with Firefox profiles.  To use it with the profiles of a different xulrunner app, pass the name of the app to it as an argument, e.g., &#8216;profilemanager thunderbird&#8217;.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=47&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2011/01/11/profilemanager-1-0_beta1/feed/</wfw:commentRss>
		<slash:comments>128</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2011/01/capture.png" medium="image">
			<media:title type="html">ProfileManager</media:title>
		</media:content>
	</item>
		<item>
		<title>ProfileManager icons requested!</title>
		<link>http://jagriffin.wordpress.com/2010/10/18/profilemanager-icons-requested/</link>
		<comments>http://jagriffin.wordpress.com/2010/10/18/profilemanager-icons-requested/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 00:39:03 +0000</pubDate>
		<dc:creator>jagriffin</dc:creator>
				<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jagriffin.wordpress.com/?p=37</guid>
		<description><![CDATA[The Profile Manager which has been bundled with Firefox from time immemorial is going to be removed from Firefox builds soon after Firefox 4 ships; see bug 214675.  Firefox will still support multiple profiles, it just won&#8217;t have a built-in UI for managing them. Instead, a few of us on the Mozilla Automation Tools team [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=37&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>The <a href="http://support.mozilla.com/en-US/kb/Managing+profiles">Profile Manager which has been bundled with Firefox</a> from time immemorial is going to be removed from Firefox builds soon after Firefox 4 ships; see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=214675">bug 214675</a>.  Firefox will still support multiple profiles, it just won&#8217;t have a built-in UI for managing them.</p>
<p>Instead, a few of us on the Mozilla Automation Tools team have been busy building a standalone replacement.  This will be available as a separate download, and will include a lot of cool features not available in the current incarnation of Profile Manager, like the capability to backup and restore profiles.  For background, see <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=539524">bug 539524</a>, and <a href="https://wiki.mozilla.org/Auto-tools/Projects/ProfileManager">this wiki page</a>.</p>
<p>There are <a href="http://people.mozilla.org/~jgriffin/profilemanager/">builds available to play with</a>, but exercise caution, as these builds are beta quality, and it&#8217;s possible there may be bugs therein which would cause profile corruption or other problems.  If you do decide to play with it, you may want to <a href="http://support.mozilla.com/en-US/kb/Backing%20up%20your%20information">backup your profiles first</a>.</p>
<p>Currently, the icon for the new Profile Manager is the default xulrunner icon:  <img class="size-full wp-image-40 alignnone" title="default48" src="http://jagriffin.files.wordpress.com/2010/10/default48.png?w=630" alt=""   /></p>
<p>This doesn&#8217;t seem very interesting for a new Profile Manager, and I lack even rudimentary graphics skills, so I&#8217;d like to request help!  If you have some graphics experience and would like to contribute to a cool new Mozilla tool, please submit an icon you think would be awesome as an attachment to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=605576">bug 605576</a>.  Icons should be in PNG format, preferably 48&#215;48 or 64&#215;64, and should be freely distributable.  The creator of the icon that is selected will be mentioned in Profile Manager&#8217;s about box, and will have the satisfaction of knowing that their icon is seen every time the new Profile Manager is used.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jagriffin.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jagriffin.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jagriffin.wordpress.com&#038;blog=15459671&#038;post=37&#038;subd=jagriffin&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jagriffin.wordpress.com/2010/10/18/profilemanager-icons-requested/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/e99d6bbf275b2b638ac6414e6f1d832b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jagriffin</media:title>
		</media:content>

		<media:content url="http://jagriffin.files.wordpress.com/2010/10/default48.png" medium="image">
			<media:title type="html">default48</media:title>
		</media:content>
	</item>
	</channel>
</rss>