GSOC Project - Experience Summarized

This was the last week of my GSOC project intern with Mozilla and here are a few things I would like to share about my project:

Project Summary(What was actually done in the project ?)

Project started with a target to write selenium end-to-end test for the OneandDone project. It started with some reasearch about existing testing tools pytest, pytest-django, pytest-mozwebqa, factoryboy etc.
We finalized to use the existing testing model but with a change in the data population technique, this time we wanted not to rely on the data on the website, instead we wanted to use the REST API to auto populate the database with the testing data before the test runs.

The version of REST API at that time was not equiped to handle user related operations i.e creating, updating and deleting users, it was able to only perform task related operations.
So to start with I wrote the REST API for creating, updating and deleting users in database. This API was written using django-restframework and I must say that it is a pretty good framework with a very good community support.
The major challenge I faced was while working with nested serializers, it was not equiped to support the update operation at that time. I spent quite some time talking to the restframework developers on their irc channel #restframework in freenode everyday and I must say that they were always helpful.
Sometimes I also used to ask questions(which could not get answered on irc) on StackOverflow.

After adding the API support for users I started writing the selenium webdriver tests which provide coverage for:
  1. Login as a new user.
  2. Login as an existing user.
  3. Test to Complete a task.
  4. Test to abandon a task.
  5. Test that existing user could update profile.
  6. Test that existing user could delete profile.

These tests used the selenium webdriver along with pytest-mozwebqa(which is a tool developed by the webqa team and consists of pytest + pytest-xdist and is configured to give html reports of test runs for different environments, saucelabs and jenkins CI)
All the Base Setup and API utilities to create/update/delete user data was also added along with the tests.

After writing these tests I also updated the user REST API to also include data for User Profile and modified the tests accordingly.

We had a release planned to 30 June for the website and some of the major P1 bugs were still left unassigned and my mentor Bob Silverberg(:bsilverberg) was the only one working on them at that time. Since the selenium tests were a low priority compared to the P1 bugs marked for release I decided to help my mentor and took 3 major P1 privacy bugs:

  1. Add ability to delete profile.
  2. Add username and privacy checkbox in user profile.
  3. Create an interface to force existing users to sign the privacy policy or to delete profile.

Fortunately I was able to fix all three of them in time and we had a great release on 30 June. I was really glad to see the features I added in the latest release.

The latest release brought a lot of changes to the website and the existing selenium tests were failing because of the recent changes. So my next job was to fix the failing tests.

Test related to User Profile were also added during this period:
Test to verify duplicate usernames are not allowed

There were also changes to the task model itself and the existing task API needed to be enhanced, so I spend some time enhancing the task API so that it could be used in tests for creating tasks before test runs.

After adding the API support it was time to write some task related tests and I started with some of them:
  1. Test Filter Tasks According to Estimated Time.
  2. Test that one time tasks are marked completed on finishing.
  3. Test that an already taken one time task cannot be taken by different user.

This summarizes the major part of my project and there were also many minor tasks taken during this period. A link to all the bugs with exact links can be found here:
Complete list of bugs taken up during project.

Working Experience:

First of all I would like to thank my mentor Bob Silverberg(:bsilverberg) for being such a great mentor and always providing guidance, support and quick reviews when required and to the whole Web QA team, members of QA and Webdev team for their support.
It was the first time I was attending around 3 meetings in a week and making formal reports informing about my work and deciding about upcoming tasks and schedule everything in advance. Initially things were a bit hard but gradually I observed myself growing and learning to collaborate with the team.
This was a completely new experience, especially my project had both parts of Webdev and QA so I got to work with some leads from both teams and was an integral part of team working on the OneandDone project.
By the end I also found myself helping other contributors, giving code reviews and merging pull requests.

This sums up my whole Google Summer of Code Project 2014 and my experience working with the awesome teams at Mozilla and I look forward to continue as a regular contributor and take up internship at Mozilla next year.
comments powered by Disqus