Aug 08 2018

This blog post is not published yet.

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 my what will be on this internship. Anyway, I have expected new experience in remote internship, open source project contributing, Google Summer of Code participating, only international remote communication. Of course, these are quite obvious expectations, but for me it was new and unknown fields.

In this post I want to make an understanding of what have I done, what is not completed (and why).

How it was

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

First internship period remembered as time of investigation. I have started to understand deeply project structure, Android Authenticator and Android Contacts API. It was start of english-only communications in team and close interaction with my mentors. Main problems for me was old code (which still was new for me) and new API. As a result it was very difficult for me period and for this reason I spent much time in research.

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

The third period was a period of tests. It looked something like try-fail-search-[repeat]. As a result was chosen Espresso 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 got an experience, studied much new functionality/libraries, was involved in architecture development and code refactoring/rewriting. It was full of international communication and interesting.

How to use the result of my work

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

Also you may wish to get sources of application and compile it by yourself. In this case you will need:

  1. Clone project by https or ssh (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%
  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. For this reason was written small count of work tests. Besides, before end of third internship period was not completed rewritten of work with interaction with server for the reason that I have plan to use PowerMockito for mock interaction with server, but for the reason that this framework must be included in @RunWith (which by default used for Android4JUnit, as I remember) that disable default work with android instrumentation tests. As a result:

  • About two weeks were spent to investigation of frameworks, approaches and trying of instruments in non-git example projects
  • About week were spent to write and actualize tests which now included in Git Branch
  • About week were spent to find better way for work with server requests

Include OpenID

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

What was done

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

  1. Fully rewritten work with network/API (Jira, PR)
    • Removed old handwork with network (via built-in sockets, put of heads and others)
    • Added, fixed and refactored work with network via Retrofit + RxJava
    • Removed in-app registration for the reason that XWiki API doesn't support work with registration - it must be implemented via web UI API
  2. Fully rewritten look like of application (Jira issue, PR). Was changed:
    • Page with setting up server address
    • Page with setting up username and password
    • Page with setting up synchronization settings
    • Page with edit of contact data
  3. Added common fields for edit and show (Jira, PR). Besides, in bounds of this task was rewritten and update part of work with contacts (Jira, PR)
    • Address
    • City (read only, it is not default field of XWiki)
    • Country (read only, it is not default field of XWiki)
    • Company
    • Comment (represent on android as Note)
  4. Added documentation for all written code (Jira, PR)
  5. Started to create tests (Jira, Git Branch)

Common contribute into project: contributors of project page, my commits (only master branch)

Useful links to my issues

Afterword

Thanks to my mentors: Thomas Mortagne and Pawan Pal which have always been happy to help me in any matter.

Tags:
    

Get Connected