Fork me on GitHub
Documentation index

Automatic bisection

As an alternative to using mozregression’s interactive mode, it is possible to evaluate builds automatically by writing a custom script. This can save a lot of time if the reproduction steps are complicated or you have a large regression range.

The --command option

The --command option is used to evaluate builds automatically. It takes as argument the command line that must be used to test the builds. A return value of 0 will indicate a good build, and any other return code will indicate a bad build.

Build variables

You can use variables in two ways:

This is the full list of available variables:

Test case with mozmill

Suppose that we know there is a regression between 2014-12-03 and 2015-01-10, and that we know that the following mozmill script can detect it (If you don’t know mozmill, see here).

Well, we just have to run mozmill with the script on each build that mozregression gives. Here are all the steps required to run the test case:

  1. Install mozmill

    pip install mozmill
    
  2. get the helpful mozmill script (or write it).

  3. Run it in mozregression

    mozregression --good 2014-12-03 --bad 2015-01-10 \
    --command 'mozmill --binary {binary} -t test1.js'
    

    Note that ‘test1.js’ is he name of our mozmill script here.