My GSoC 2018

Last modified by Ecaterina Moraru (Valica) on 2020/01/28

Aug 08 2018

A little bit about me

My name is Aleksei (Alex) Ovsiannikov, I am 23 and I am a student of Wuhan University. I have participated in GSoC internship in project XWiki and worked with "XWiki Android Authenticator".

What did I expect from GSoC 2018

This GSoC is my first Google Summer of Code and for this reason it was a mystery for me what will be happening on this internship. Anyway, I have expected new experience in remote internship, open source project contributing, Google Summer of Code participating and international only remote communication. Of course, these are quite obvious expectations, but for me it was new and unknown experience.

In this post I want to describe what I have finished and what is not completed yet and why.

How it was

My first impression - confusion. Actually, when I received email with acception for GSoC it stunned me. After that a question came to my mind - what to do now? I have started to search my mentors (at that moment I did not know where to find them). That was my start of GSoC.

I remembered the first internship period as time of investigations. I have started to understand project structure deeper, Android Authenticator and Android Contacts API. It was the start of English-only communications in team and close interaction with my mentors. Main problems for me were the old code (which was still new for me) and new API. As a result it was a very difficult period for me and for this reason I spent plenty of time in researching.

The second period was a period of fixes and improvements. First of all, I have documented all code that was presented at the moment. After this process I got a lot of understanding of code work and found some places which had bugs or deficiencies, created by my misunderstanding.

The third period was a period of tests. It looked just about like try-fail-search-[repeat]. As a result Espresso was chosen for UI testing and Mockito for all tests. Unfortunately, I did not find the solution for problem of mocking server interaction from UI tests (it will be described later).

In conclusion, I am absolutely sure that this internship was useful and helpful. I have studied new frameworks, functionality, Android API and more others. I got an experience in international communication. It was extremely fascinating.

How to use the result of my work

Actually you have several ways to get application "XWiki Android authenticator":

Also you can get sources of application and compile it by yourself. For this:

  1. Clone project by https (usualy it is command git clone ...). After this action you will have project on master branch.
  2. Open folder and create local.properties file with content sdk.dir=%ANDROID_HOME% (here %ANDROID_HOME% is path to sdk location)
  3. You can import project in Android Studio or build app by command ./gradlew clean cleanBuildCache build

What was not done

Tests

Last period I was busy on investigation of Android tests, frameworks, approaches to writing of tests and other issues. For this reason only a small amount of tests were written. Besides, before the end of the third internship period rewriting of work with interaction with server was not completed for the reason that I have planned to use PowerMockito for mock interaction with server, but as this framework must be included in @RunWith (which is used for Android4JUnit by default, as I remember) that disabled default work with android instrumentation tests. As a result:

  • About two weeks were spent on investigation of frameworks, approaches and trying of instruments in non-git example projects
  • About a week was spent on writing and actualizing tests which are now included in Git Branch
  • About a week was spent on finding a better way for working with server requests

Include OpenID

For the reason that the part with tests was not completed and Open Id implementation is still to be included on XWiki side I could not have completed this big task.

What is done

If you want to see all issues which were closed/solved by me, you can open XWiki Jira with filter by my closed issues. What was completed:

  1. The work with network/API fully rewritten  (Jira, PR)
    • Old handwork with network was removed (via built-in sockets, put of heads and others)
    • Work with network via Retrofit + RxJava was added, fixed and refactored
    • In-app registration was removed for the reason that XWiki API doesn't support work with registration - it must be implemented via web UI API
  2. Front of application was fully rewritten (Jira issue, PR). What was changed:
    • Page for setting up the server address
    • Page for setting up the  username and password
    • Page for setting up the  synchronization settings
    • Contact data edition page
  3. Common fields of contacts which available for edition and showing were added (Jira, PR). Besides, within this task the part work with contacts was rewritten and updated (Jira, PR)
    • Address
    • City (read only, it is not a default field of XWiki)
    • Country (read only, it is not a default field of XWiki)
    • Company
    • Comment (represented on android as Note)
  4. Documentation for all written code is added (Jira, PR)
  5. Creating tests was started (Jira, Git Branch)

Common contribution into project: contributors of project page on GSoC coding period (my nickname on Github is InsanusMokrassar), my commits (only master branch)

Useful links to my issues

Afterword

I am grateful to my mentors Thomas Mortagne and Pawan Pal; they have always been happy to help me in any matter.

Get Connected