QA/Platform/Graphics/Guides: Difference between revisions

 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Finding a Regression Window =
= Finding a Regression Window =
== Installing Mozregression ==
== How Mozregression Works ==
Instructions for Windows:
[http://mozilla.github.io/mozregression/install.html Mozregression] works by downloading Firefox Nightly builds from a range of dates allowing you to easily narrow down the first Nightly which introduced a bug. Once a Nightly is downloaded and installed, Mozregression will start Firefox with a temporary profile and allow you to test your bug. After testing the bug, you give Mozregression a ''good'' or ''bad'' command and it will split the range in half, downloading the next build. Once the range has been narrowed down to a single day it will give you a pushlog for the build that will identify the changes which may have caused the bug. This should be attached to the bug report.
* Download and install [http://www.activestate.com/activepython/downloads Python 2.7]
* Open a Windows command window (Run cmd.exe)
* Execute this command: <pre>pip install -U mozregression</pre>
* Confirm mozregression is installed by executing this command: <pre>mozregression --version</pre>


== How Mozregression Works ==
As mentioned above, the range will first be narrowed down to a particular Nightly build, then continue to an Inbound build, which will often get us down to a single patch. After the Nightly build search is done, mozregression will note the range for it, then continue to bisect the Inbound builds. When recording the results of mozregression, it is useful to record the Nightly range as well, even if the Inbound range is found.
Mozregression works by downloading Firefox Nightly builds from a range of dates allowing you to easily narrow down the first Nightly which introduced a bug. Once a Nightly is downloaded and installed, Mozregression will start Firefox with a temporary profile and allow you to test your bug. After testing the bug, you give Mozregression a ''good'' or ''bad'' command and it will split the range in half, downloading the next build. Once the range has been narrowed down to a single day it will give you a pushlog for the build that will identify the changes which may have caused the bug. This should be attached to the bug report.


== Using Mozregression ==
== Using Mozregression ==
''We recommend [[#Narrowing_the_Range|narrowing down the range]] manually before using mozregression.''
'''''Note: We recommend [[#Narrowing_the_Range|narrowing down the range]] manually before using mozregression.'''''
 
Using mozregression is as simple as running ''mozregression'' from a command prompt. However, this will start with Nightly builds from January 1, 2009 which could make finding the regression range a longer process. Assuming you know the build dates for the first bad and last good Nightly you would run ''mozgression --good YYYY-MM-DD --bad YYYY-MM-DD'' where YYYY-MM-DD is the date of each build. See [[#Narrowing_the_Range|narrowing down the range]] for information on getting those dates.
 
1) Open a command prompt and run ''mozgression --good YYYY-MM-DD --bad YYYY-MM-DD'' where YYYY-MM-DD is the range of dates you want to test.


If you don't know the dates, simply run ''mozregression'' from a terminal/command window. This will download Firefox Nightly builds starting from January 1, 2009. However, you can save yourself some time and hassle if you give mozregression a narrower range. You may find some of the really old builds will just fail to work, especially on newer platform versions.
2) Mozregression will download builds between those dates, start with a new profile, and allow you to test for your bug.


If you know the dates, simply run ''mozgression --good YYYY-MM-DD --bad YYYY-MM-DD'' where good is the date of the last build you know is good and bad is the date of the first build you know is bad.
3) Once you're done testing, switch back to the command prompt and mark the status of the build:
* ''bad'' if the build reproduces the bug
* ''good'' if the build does not reproduce the bug
* ''skip'' if you want to skip testing the bug in that build
* ''broken'' if the build does not work and you're unable to test your bug
 
4) Mozregression will bisect the range and grab the next nightly, repeating the process above
 
5) Once the range has been narrowed to a single day it will provide changeset IDs and a pushlog for the range.
* Make note of this and copy it to your bug report.
 
6) Mozregression will then begin bisecting the range with mozilla-inbound builds
* You can skip this step unless someone has asked you to bisect the range further.


== Narrowing the Range ==
== Narrowing the Range ==
'''''Note: We recommend narrowing down the range to six weeks between builds before using mozregression.'''''
'''''Note: We recommend narrowing down the range to six weeks between builds before using mozregression.'''''


* Start from the date of the build you reproduced the bug with
1) Start by getting the Build ID for the Firefox build with which you're reproducing the bug
* Open the ''about:support'' page and make note of the Build ID from the ''Application Basics'' section (the build ID follows a YYYYMMDDhhmmss format).
* Open the ''about:support'' page
* Install a build from six weeks before that date from [ftp://ftp.mozilla.org/pub/firefox/nightly/ ftp.mozilla.org]
* Scroll down to the ''Application Basics'' section
* If that build reproduces the bug, go back another six weeks
* Make note of the ''Build ID'' as the "first bad" build (it's a string of numbers in YYYYMMDDhhmmss format)
* Repeat this process until you find a build that does not reproduce the bug and make note of its build date
 
* Use these dates to run mozregression
2) Install a build from six weeks before that date
* Go to ftp://ftp.mozilla.org/pub/firefox/nightly/
* Go to the folder for the year
** For example, the Firefox Nightly builds from 2015 are at ftp://ftp.mozilla.org/pub/firefox/nightly/2015
* Go to the folder for the month
** For example, the Firefox Nightly builds from April 2015 are at ftp://ftp.mozilla.org/pub/firefox/nightly/2015/04/
* Go to the folder for the mozilla-central build from the day
* Download the installer for the platform you want
** For example, the Firefox Nightly 40.0a1 win32 build for April 16, 2015 is at ftp://ftp.mozilla.org/pub/firefox/nightly/2015/04/2015-04-16-03-02-09-mozilla-central/firefox-40.0a1.en-US.win32.installer.exe
* Run the installer, start Firefox, and try to reproduce the bug
 
3) If that build reproduces the bug
* Make note of the Build ID as the "first bad" build
* Repeat step 2 going back another six weeks
 
4) Once you find a build that does not reproduce the bug
* Make note of the Build ID as the "last good" build
* You can now run mozregression and give it the good/bad dates based on the build IDs you noted


For example, if the build ID of a good build is 20150401123456 and the build ID of a bad build is 20150410123456:
For example, if the build ID of a good build is 20150401123456 and the build ID of a bad build is 20150410123456:
Line 61: Line 89:


It may be necessary to bisect the range further but that's outside the scope of this document.
It may be necessary to bisect the range further but that's outside the scope of this document.
= Testing a Try Build =
TO BE DETERMINED
Confirmed users
14,525

edits