New Contributors to Perftest đ„đŠâ±
This page is aimed at people who are new to Mozilla and want to contribute to Mozilla source code related to Performance Testing. Mozilla has both git and Mercurial repositories, but this guide only describes Mercurial - there are some guides for git in the Resources section.
If you run into issues or have doubts, check out the Resources section below and donât hesitate to ask questions. :) The goal of these steps is to make sure you have the basics of your development environment working. Once you do, we can get you started with working on an actual bug, yay!
Accounts, communication
- Set up a Bugzilla account (and, if you like, a Mozillians profile). Please include your Riot/IRC nickname in both of these accounts so we can work with you more easily. For example, Eve Smith would set the Bugzilla name to âEve Smith (:esmith)â, where âesmithâ is an example of a common Riot/IRC nickname pattern. You can also pick a fun nickname for yourself.
- For direct communication with us it will be beneficial to setup Riot using these instructions.
- Join our #perftest channel, and introduce yourself to the team. Check this page for who you can ping for help or to chat. Weâre nice, I promise, but we might not answer right away due to different time zones, time off, etc. So please be patient.
- When you want to ask a question on Riot, just go ahead and ask it even if no one appears to be around/responding. Provide lots of detail so that we have a better chance of helping you. If you donât get an answer right away, check again in a few hours â someone may have answered you in the meantime.
- If youâre having trouble reaching us over Riot, you are welcome to send an email to us instead. Itâs a good idea to include your Riot nick in your email message.
Getting the code, running tests
The first thing to do is to get your build environment set up. Follow the Getting Started instructions here. You can find more instructions here as well. We suggest using an artifact build when youâre asked since speeds everything up a lot. After you have the build ready and ran `./mach run` successfully you should be good to go. If you hit any issues getting ready, we can help you in #perftest.
So youâve run Firefox locally - now what? Itâs time to test it!
We do performance testing so you will be most interested in Raptor-webext, and Raptor-browsertime. You can find more information about all of the projects we have here. A simple test to start with would be this one which runs a google page load test with Raptor-webext:
./mach raptor --test raptor-tp6-google-firefox
To run Raptor-browsertime on the same page you only need to add the --browsertime argument. But first you have to install browsertime locally by running:
./mach browsertime --setup
If everything installed correctly you can now run the following:
./mach raptor --test raptor-tp6-google-firefox --browsertime
Note that Raptor-browsertime is under heavy development at the moment so itâs likely that youâll hit issues there, but you can file bugs for those or let us know about them so we (or you) can fix them.
The code for these tools resides in this folder. Browsertime code can also be found here after itâs installed.
Work on bugs and get code review
Once you are familiar with the code of the test harnesses, and the tests you might want to start with your first contribution. You can follow these instructions on how to submit a patch.
How you test a patch will change depending on what's being modified. Generally, you will be running Raptor-webext (with commands similar to those listed above) or it's unit-tests to test your changes, but you can ask us in #perftest if you're not sure what you should run or if you need help getting a test command working. For the patch reviewer, you can use #perftest and someone from the team will review it (or you can put whoever helped you with the patch).
You can find âgood-first-bugsâ by looking in codetribute in the Test Automation section, projects from our team include Talos, Raptor, and Performance. Many team members also work on Dashboards and Reporting so that would be another good place to look. If youâre not sure what you want to hack on, ask us in #perftest - weâd be happy to help find you something. :)
Resources
These resources might not be directly related to Performance Testing or the code we work on, but they may have useful information for you to make use of.
- Search Mozillaâs code repositories with searchfox or DXR.
- Another guide for new contributors. It has not been updated in a long time but itâs a good general resource if you ever get stuck on something. The most relevant sections to you are about Bugzilla, Mercurial, Python and the Development Process.
- Mercurial for Mozillians
- More general resources are available in this little guide :maja_zf wrote in 2015 to help a student get started with open source contributions.
- Textbook about general open source practices: Practical Open Source Software Exploration
- If youâd rather use git instead of hg, see git workflow for Gecko development and/or this blog post by :ato.
Acknowledgements
Much of this new contributor guide was based on the Marionette guide and uses a good amount of information from there.