-
Notifications
You must be signed in to change notification settings - Fork 1
Report week 3
Fixed problems of testing the camera-preview on cirrus by editing the .cirrus.yml file and then adapting the cirrus emulator tests. Then I went on to refactor the camera-preview and implemented the compass-view. I completed one of my two tasks this week, which was the implementation of the compass. However, it still needs some reworking for fluidity, adaption for different phone orientation and better adaptation for different screen sizes.
I still struggle with time management as the testing and reviewing take a lot more time than I expected. This is something that will be improved quickly.
I implemented the scoring system for the discovered peaks. Each user acquire a certain amount of points when he discovers peaks (computed using peak height). A local database containing the highest peaks of each country has been added. Everytime a peak is discover by the user, the country in which the peak is located is deduced. By comparing the name of the peak with the highest peak of the country, one can deduce if the user found the highest point in the country. An extra bonus point is given for that. A bonus is also given if the user discovers for the first time a peak higher than 1000,2000,3000,4000,5000,6000,7000,8000m, this feature is not finished because it requires the implementation of the database.
I had no time to implement anything for the second task I was assigned for (user database) but I already read some documentation about it. I will implement this database next week and also save which country highest peak the user has discovered.
I implemented the "username choice" feature. It took a bit more time than expected, as I had to connect it with the UI and I spent a lot of time writing the tests.
In particular, I struggled a lot trying to use Mockito (and, precisely, Power Mockito for static classes used for Auth) but, as I had a lot of errors due to the gradle settings, I eventually figured out a way to test the username choice without it and I'm very happy with the resulting raise of the code coverage.
Next week I will try to test the sign-in with Mockito, as I could not do it during this week.
This week my goal was to connect the google sign in part to the UI and also create so that our ranking items are created dynamically based on a list, instead of being hard-coded.
The week went well I was able to complete the goals I set out. It took a bit more time than what I estimated. It was learning how to write the tests that took time. Connecting the sign in part, was rather easy. The code was mostly written and just needed to move to the correct activity. The dynamic creation took a bit of rework and some tutorials but the hard part was to write tests.
For next time I will not underestimate the time it takes to write the tests. It takes about 50% of the time to implement something.
I was finally able to test the gps correctly using espresso.
After that I started working on the 3d map. I am using an API called opentopography that will return a black and white .gtiff image representing a height map. I am passing a bounding box with a fixed size surround in the user to the API. The code saves an instance of the last computed bounding box.
When the 3d map is requested, the code checks if the newly computed bounding box center is more than a fixed distance to the old bounding box center. If it has, it will request a new 3d map to the api, if not it will continuing using the last one.
I am having problems downloading the image. I am building and logging a url that if used on my browser works fine, but takes approximately 5 seconds to return the image. I think this is causing some problems that disconnect the app from the server, returning a null image.
This week we have been implementing a lot of new features and tests. The developpement of the user interface as well as back end funcionnalities goes forward pretty quickly since we managed to sovled all problems regarding the repo last week. We've reached a decent code coverage this week (80%) which is really good considering all hard-to-test functionnalities that our app uses. As suggested we managed to get rid of the tests that produced random results.