Abhishek/Gsoc2013Proposal

From MozillaWiki
Jump to navigation Jump to search


Personal Details

  • Name: Abhishek Kumar Singh
  • Time Zone: IST(GMT + 5:30)
  • Email: abhishekkumarsingh.cse@gmail.com
  • Other contact methods: +91 8893839740

Unit Tests For Mozbase

Introduction

An idea of unit testing mozbase is proposed after having a good discussion with jhammel, jmaher, ctalbert (members of ateam). Actually, it is not just writing better automated test codes but a total refinement of mozbase unit-tests including unittesting framework in such a way that it will reduce complexity of code and will be efficient. Following are the details of the project and the proposed plan of action.

Abstract

Implementing unit tests for mozbase modules using unittest framework with proper refactoring, minimum boilerplates and better test coverage. Doing sanity checking, resulting in efficient test codes.

Benefits to Mozilla community

  • Implementation of mozbase tests with less complicated tests and Unittesting framework would certainly result into an improved testing mechanism and error handling in mozbase.
  • Improvement in the test coverage will result in improvement of code quality of mozbase.
  • A detailed documentation on the work to help the contributers for further improvements on the work.
  • Writing unit-test will help in deep extensibilty to the behaviour of mozbase code and eventually results in solving many of the issuses related to mozbase-testing on bug tracker

Project Details

The aim of the project is not just quality assurance of mozbase but to provide a proper implementation of Unit testing framework rather than just a POC(proof of concept). It has far greater goals. Mozbase is so important that all of Mozilla’s test harnesses use mozbase to some degree, including Talos, mochitest, reftest, Autophone, and Eideticker. But the Current version of mozbase lacks proper unit tests and has poor test coverage. This project deals more about writing new efficient tests and complete refinement of old written mozbase tests using unit testing. The idea here is to dug deeper into testing to provide and maintain robustness and quality of mozbase. It is also important that the new tests should be less complex and more efficient. It should have more automated behaviour and minimum or no boilerplates. It should also pass pep8 and pyflakes testing.

One other feature of the framework should be that it should be sustainable and support further improvements. It means that if the tests need to be implemented further because of addition or enhancement of new feature(s) or tests need to be modified after a year or something, only slight change in the fixers should be enough and an automated process would be taking care of implementation of respective fixers to the tests. Since, it would be quite troublesome to implement all the tests again and again with each new modification or new release of mozbase dependencies, this feature is quite necessary from development perspective.

Tools Required During Development

  • Python Unittesting framework
  • Coverage
  • Pep8
  • Pyflakes
  • Vim (IDE)


The outline of my work plans

Modules of the mozbase which will be tested are :

  • moznetwork
  • mozprocess
  • mozcrash
  • mozdevice
  • mozfile
  • mozhttpd
  • mozinfo
  • mozinstall
  • mozlog
  • manifestdestiny
  • mozb2g
  • mozprofile
  • mozrunner

These modules further consists of different submodules that will be unit tested.

Schedule of Deliverables

The project is planned to be split across following weekly phases:

[Test Week 1] Adding unit tests for mozinfo and moznetwork.

[Test Week 2] Writing tests for mozfile and mozhttpd

[Test Week 3] Tests cover sub-modules of mozprofile.

[Test Week 4] Continuation of tests for sub-modules of mozprofile

[Test Week 5] Creating tests for sub-modulese of mozprocess

[Test Week 6] Continuation of tests for sub-modules of mozprocess

[Test Week 7] Adding tests for mozB2g, mozcrash and mozinstall.

[Test Week 8] Writing tests for mozdestiny.

[Test Week 9] Test for mozrunner sub-modules.

[Test Week 10] Adding tests for mozdevice sub-modules.

[Test Week 11] Continuation week for mozdevice

[Test Week 12] Final week for mozdevice and to polish the work before submission

Deliverables

  • Tests covering mozdevice, mozprocess and other core modules of mozbase.
  • Contribute to the overall code quality by uncovering issues with the unit tests
  • Less complex test infrastructure
  • More efficient testing mechanism


Do you have any other commitments during the GSoC period? How will they affect your work?

No, I don't have any university exams and internship during GSoC phase. My first and foremost focus will be my GSoC project during May - September.

Open Source Development Experience

Any experience you have, even a few bug reports or some tiny 2-line patch to something obscure. Please give links to online examples of your code, if you have any.

I have contributed to Mozilla and some other open source projects. Details can be found here https://wiki.mozilla.org/Abhishek/contributions

Work/Internship Experience

Anything relevant to the project, or related to browsers, web design or software development.

I have developed a shell which is compatible with Linux and Mac OSx. I have also developed a simple Todo-list. Details can be found here https://wiki.mozilla.org/Abhishek/contributions

Academic Experience

What you're studying in university/college (even if it doesn't seem relevant), why you chose it, and how you're doing.

I am a 3rd year B.Tech Computer Science and Engineering student at Amrita School of Engineering, Amritapuri, India. I have keen interest in Open Source Software and I am doing pretty good in this field.

Why Me

Tell us, with reference perhaps to the information above, why you in particular are the right person to pick for this project. Note that everyone claims to be enthusiastic and hard working; that's probably not enough on its own.

I have sound programming skills in Python, C and C++. I am passionate about software testing. I have good knowledge of python unit testing framework, Py.test framework, mocking framework, Cmocka framework and coverage tools which can been seen from some of my open source contributions. I am open source enthusiast and familiar with different open source technologies and the last but not the least I am willing to contribute to my project and Mozilla after completion of GSoC 2013.

Why Mozilla

Tell us why you chose to apply to us.

Mozilla is one of the prominent enthusiastic Open Source leader and is best in its field. It has great community support which provides a very good platform for person like me, where learning and implementation of concepts goes hand in hand in the form of contribution.