Auto-tools/Projects/Test-Informant

From MozillaWiki
Jump to: navigation, search

Overview

Test Informant is a tool designed to report on the state of tests at Mozilla. For each test suite and platform combination, it can display the total number of tests being run, as well as the total number of tests that are skipped or disabled. It can also show how many tests have been added/enabled or removed/disabled over a given period of time.

The goal of Test Informant is to provide a higher level of visibility into the current state of our tests. When someone asks questions like "How many reftests are we running on linux64 debug builds?" or "What percentage of mochitests are skipped on android?" we should be able to answer them by directing them towards a Test Informant report.

Implementation

Test informant uses ActiveData to query which tests have run on the given branch on the given days. It then uses the data to generate an HTML formatted report. The entire tool is written in JS and is executed on the client side, anyone can host and use a static copy of test-informant. It uses JQuery, bootstrap and handlebars to format the reports.

Contribute

Please take a look at the source repository. For the future, we'd like to:

  • Export reports into various formats (starting with a simple standalone HTML report)
  • Add more detailed information (i.e distinguish between 'added' and 'removed')
  • Improve UI
  • Add some basic unit tests.

If you have any questions or comments about Test Informant, please contact:

  • Andrew Halberstadt, ahalberstadt@mozilla.com, ahal on irc

Getting set up for Development

In order to work on Test-Informant bugs, you'll first need to clone the repository:

   $ git clone https://github.com/mozilla/test-informant.git

You may want to first fork it to your personal github account and clone that instead. If you do this, you can add an upstream remote:

   $ git clone https://github.com/<username>/test-informant.git
   $ git remote add mozilla https://github.com/mozilla/test-informant.git

Then you can update your local copy as follows:

   $ git pull mozilla master
   $ git push origin master

Testing Code

In order to test out your changes, you'll need to set up a local webserver to host the test-informant. There are many ways to do this, but if you have python installed, the easiest is:

   $ cd test-informant
   $ python -m SimpleHTTPServer

Then browse to http://localhost:8000 (or whatever port was dumped to the console).

Submitting Changes

The preferred way of contributing code to Test Informant is via github pull requests. If you are unfamiliar with pull requests, please read the official documentation. Once you have created a pull request, you'll need to ask for review in the bug you are currently working on. To do this:

  1. Create a new attachment in the bug by clicking 'Add an attachment'.
  2. Click 'paste text as an attachment'.
  3. Copy the link to the github pull request into the text box.
  4. Fill out the description, reviewer and comment as normal and submit.

Bugzilla will automatically detect that a pull request was pasted and create a link to it for you. Once you have an r+, you may need to remind the reviewer to merge your pull request for you!

Bugs

Open bugs

Full Query
ID Priority Summary Assigned to
1085581 -- Add a link to the test's manifest next to the test path in the report
1085640 -- Create a test suite for Test Informant
1086570 -- Don't hardcode urls in the report html as they can vary from suite to suite
1125863 -- Reports should differentiate enabled from added and disabled from removed

4 Total; 4 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Fixed bugs

Full Query
ID Priority Summary Assigned to
1124689 -- Test informant should use structured logs instead of parsing manifests Alice Scarpa [:adusca]
1124720 -- Make test-informant listen for test jobs instead of build jobs Alice Scarpa [:adusca]

2 Total; 2 Open (100%); 0 Resolved (0%); 0 Verified (0%);