Web Testing/Automation/CodeReviewProcess

Once code has been pushed into a GitHub branch and a pull request has been created the WebQA team will be notified. So what happens next?

Starting a code review

When doing a code review where should you start?

  • Start by checking that the [StyleGuide]
  • Check that the code meets Python best practises
  • Check that the code looks maintainable and easy to read

Who can do a code review?

The whole Mozilla WebQA team can do code reviews and the whole team is encouraged to do code reviews. The reason behind this is that we all learn by new techniques that people think of. It also opens a discussion between the whole team if we feel that something should change

How to do a merge?

Once a pull request ready to be pulled the following steps should be followed.

  • git branch pullrequest
  • git checkout pullrequest
    • The reason for doing it in a branch is if there are conflicts it won't break you local master
  • git remote add requestee requestee_git_fork_url
  • git fetch requestee && git merge requestee/pull_request_branch_on_their_fork
  • Run the tests
    • Sometimes good looking code doesn't actually work so lets prove it works!
    • If, and only if, it passes do the next steps
  • git checkout master
  • git merge pullrequest master
  • git push origin master
  • git branch -d pullrequest

This will have it all stored in the remote master and you will have a clean version locally