Geo Catching Sprint #3 Kick-off

Similar documents
Packaging, automation, Continuous Integration

AUTOMATION TESTING FRAMEWORK FOR LUMINOUS LMS

How to set up a continuous integration process in the cloud

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

This release of Micro Focus Fortify Software includes the following new functions and features. Micro Focus Fortify Software Security Center

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

Handel-CodePipeline Documentation

Lab 5 Exercise Build and continuous integration tools

Simplified CICD with Jenkins and Git on the ZeroStack Platform

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

This tutorial is meant for software developers who want to learn how to lose less time on API integrations!

Tools. SWE 432, Fall Design and Implementation of Software for the Web

BlackBerry Developer Global Tour. Android. Table of Contents

Enabling Mobile Automation Testing using Open Source Tools

OpenProject AdminGuide

Developing Android applications in Windows

FRONT USER GUIDE Getting Started with Front

Test-Driven Development JUnit

Hello Gradle. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

#jenkinsconf. Jenkins user plugin. This time it's. Jenkins User Conference Israel. Shiran JFrog

InPost UK Limited OpenCart Integration Guide Version 1.0

Index. Chaminda Chandrasekara 2017 C. Chandrasekara, Beginning Build and Release Management with TFS 2017 and VSTS, DOI /

FROM VSTS TO AZURE DEVOPS

Getting Started with Gradle

Google Maps Troubleshooting

Sample Spark Web-App. Overview. Prerequisites

GAVIN KING RED HAT CEYLON SWARM

An Introduction to Eclipse Che Lets build a custom cloud IDE. October 2015 Tyler Jewell, Eclipse Che Project

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

Continuous Integration, Continuous Deployment and Continuous Testing by HP Codar using ALM and Jenkins

CSCI 2600: Principles of Software. Spring 2017 Lecture 01 Bill Thompson

Kony MobileFabric Engagement Services QuickStart Guide

Lab 6: Google Maps Android API v2 Android Studio 10/14/2016

Lecture 13 Mobile Programming. Google Maps Android API

Continuous Integration (CI) with Jenkins

Object Oriented Programming. Week 1 Part 2 Git and egit

Django MFA Documentation

Lab 08. Command Line and Git

What s new in IBM Operational Decision Manager 8.9 Standard Edition

myttm General Help for Teams

Python Unit Testing and CI Workflow. Tim Scott, Python Meetup 11/07/17

Hello Maven. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

Bitnami MEAN for Huawei Enterprise Cloud

Tutorial on OpenCV for Android Setup

Introduction: Manual Testing :

Kurento Room Documentation

Jahia Studio JAHIA DOCUMENTION

Salvatore Rinzivillo VISUAL ANALYTICS

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

TDDC88 Lab 4 Software Configuration Management

Managing BDD. Test Case Management for BDD Automation

Who Moved My Module? 1

Software Development I

PHP Composer 9 Benefits of Using a Binary Repository Manager

Table of Contents. Concepts

Unit Testing & Continuous Integration

Classes, interfaces, & documentation. Review of basic building blocks

Technology Background Development environment, Skeleton and Libraries

TM DevOps Use Case TechMinfy All Rights Reserved

Using the SQL CI TeamCity plugin in SQL Automation Pack

Php4u Payment Restrictions Module for Magento 2

Family Map Server Specification

CS2113 Lab: Collections 10/29/2018

ipass SmartConnect Getting Started Guide for Android Version MARCH 2017

Examples. Stack. VideoPlayer

Python Schema Generator Documentation

SDK Developer s Guide

Test Execution and Automation. CSCE Lecture 15-03/20/2018

CATERPILLAR APPS COMMUNITY (CAC) Analytics Integration Guide

Lab Exercise Test First using JUnit

Create-A-Page Design Documentation

Jenkins User Conference Israel. #jenkinsconf. CI / Liveperson. Gidi Samuels. July 16, #jenkinsconf

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

MEAN February. techdt.la

Creating a Patch. Created by Carl Heymann on 2010 Sep 14 1

Mobile Application Development Google Maps Android API

PORTALS, DASHBOARDS AND WIDGETS DIGITAL EXPERIENCE MANAGER 7.2

Continuous Integration with Jenkins

MicroStrategy Academic Program

Unit Testing. CS 240 Advanced Programming Concepts

Look ma, no hands Jenkins Configuration-as-Code All Rights Reserved.

Advanced Java Testing. What s next?

Class Dependency Analyzer CDA Developer Guide

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Instruction Guide! VERITEXT VAULT - ONLINE DEPOSITORY

Minimum information needed to open a Service Request for OmniSwitch 6900/10K. How to collect the main files and information present on a switch?

TangeloHub Documentation

Team Management. Coaches and Team Managers Guide

b. Developing multiple versions of a software project in parallel

nacelle Documentation

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

emam and Adobe Premiere Panel Guide

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

0. Introduction On-demand. Manual Backups Full Backup Custom Backup Store Your Data Only Exclude Folders.

Tutorial: Developing a Simple Hello World Portlet

Testers can write good code too. Corina

AgileSCM Release 4.1. AgileSCM Release 4.0. AgileSCM Release 3.2. New Features. Bug Fixes. New Features. Bug Fixes

Transcription:

LP IDSE - GL Geo Catching Sprint #3 Kick-off 03/01/2017 Cécile Camillieri/Clément Duffau 1

GeoCatching sprint #1 Drawing of zones on a map User login and joining of a game Browser-based geolocation of the player Color differently the zone the player is in 03/01/17 - CC - camillie@i3s.unice.fr 2

GeoCatching sprint #2 [M1] Advanced administration of players and avatars. Players ranking. [M2] Team administration. Player can join a team and catch zones for this one. [M3] Define zones from shapes with the Shape WS [M4] Handle catching a free zone via mini-game [M5] Handle zone reinforcement (zone already catched) [M6] Handle catching a non-free zone via mini-game 03/01/17 - CC - camillie@i3s.unice.fr 3

Current Architecture Web-based Interface use token in requests Game Logic define game zones Shapes make sure token is valid retrieve token Google Map Javascript API 03/01/17 - CC - camillie@i3s.unice.fr Login users database Web-service 4

Current Architecture (for some) Admin Web-based Interface use token in requests Game Logic define game zones Shapes Admin make sure token is valid Game retrieve token Player Google Map Javascript API 03/01/17 - CC - camillie@i3s.unice.fr Login users database Web-service 5

GeoCatching sprint #3 to 5 Integration of all sprints #1 and #2 features for your team Development of a mobile interface to play Creation of a new, unique feature per group 03/01/17 - CC - camillie@i3s.unice.fr 6

Current Architecture Web Interface Admin Admin? Shapes Game? Player Game Logic Login users database Mobile Interface Web-service 03/01/17 - CC - camillie@i3s.unice.fr 7

How to... Do more with Jenkins

Jenkins Pipelines then then TASK 1 TASK 2 TASK 3 TASK 1 TASK 2 TASK 3 Success Success Failure TASK 1 TASK 2 TASK 3 Success Failure Not run 9

Pipelines with Jenkinsfile node ('master'){ stage('back-maven') { checkout scm sh 'mvn -f mavenfolder/pom.xml clean package' } stage('front-angular') { checkout scm sh 'cd folder; npm install; bower install; grunt' } stage('front-android') { checkout scm sh 'cd androidfolder;./gradlew assemble' } } 10

Jenkins & Android Need to update.gitignore file.jar ^(*gradle-wrapper)*.jar Generate a gradle wrapper (or use the one from Android Studio) and add it to git Gradle wrapper = All the directory gradle/ + gradlew at android project root git update-index --chmod=+x gradlew Commit and push to your repo 05/01/17 - CD - duffau@i3s.unice.fr 11

How to... Deploy your web services

Back to: Plugins for custom goals mvn jetty:run run a jetty (server) instance based on the configuration <plugins><plugin>... <configuration> <scanintervalseconds>10</scanintervalseconds> <webapp> <contextpath>/path</contextpath> <descriptor> [...] web.xml</descriptor> </webapp> </configuration> Contains configuration for the web-service </plugin></plugins> 03/01/17 - CC - camillie@i3s.unice.fr 13

Back to: Plugins for custom goals mvn jetty:run run a jetty (server) instance based on the configuration => Deploy the war on a jetty instance => Available at localhost:8080/path 03/01/17 - CC - camillie@i3s.unice.fr 14

Deploying the war on a server Jetty server available at http://iut-outils-gl.i3s.unice.fr/jetty/ Username: jetty Password: deploy2016 Deployment: Command line: scp /path/to/war jetty@iut-outils-gl.i3s.unice.fr:/opt/jetty/webapp/my.war Using a tool like FileZilla: 03/01/17 - CC - camillie@i3s.unice.fr 15

Deploying the wars on a server Your wars must be directly in the folder /opt/jetty/webapp/ No sub-folder Only upload a single war for the same service Always use the same names for your wars The name of your wars must follow this pattern Start with idse-x where x is the id of your team (1 to 4) A file idse-6.war will result in your web-service to be deployed at the url: http://iut-outils-gl.i3s.unice.fr/jetty/ idse-6/{whats/defined/in/your/war} 03/01/17 - CC - camillie@i3s.unice.fr 16

How to... Use Maps API for Android

Setting up with an existing project Create a new Google Maps Activity 03/01/17 - CC - camillie@i3s.unice.fr 18

Setting up with an existing project A file google_maps_api.xml will be added in your resources 03/01/17 - CC - camillie@i3s.unice.fr 19

Setting up with an existing project Follow this link to get a key (it is different from the JS key) 03/01/17 - CC - camillie@i3s.unice.fr 20

Setting up with an existing project Follow the instructions 03/01/17 - CC - camillie@i3s.unice.fr 21

Setting up with an existing project Put your key in the file 03/01/17 - CC - camillie@i3s.unice.fr 22

Project configuration build.gradle should have a google play services dependency compile 'com.google.android.gms:play-services:10.0.1' the manifest should define the proper permissions <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="android.permission.internet" /> the manifest should define the key and play services version <meta-data android:name="com.google.android.geo.api_key" android:value="@string/google_maps_key" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 03/01/17 - CC - camillie@i3s.unice.fr 23

Setting up without Android Studio Detailed instructions https://developers.google.com/maps/documentation/android-api/config?hl=fr https://developers.google.com/maps/documentation/android-api/signup?hl=fr#obten ir_une_cle_dapi_android For Xamarin https://developer.xamarin.com/guides/android/platform_features/maps_and_location /maps/part_2_-_maps_api/ https://developer.xamarin.com/guides/android/platform_features/maps_and_location /maps/obtaining_a_google_maps_api_key/ Documentation https://developers.google.com/maps/documentation/android-api/intro?hl=fr 03/01/17 - CC - camillie@i3s.unice.fr 24

How to... Emulate Android

With Genymotion Genymotion is a free, powerful Android emulator https://www.genymotion.com/fun-zone/ Download & Install Launch emulation for pre-defined devices Plugin for Android Studio Use from Android Studio: https://www.genymotion.com/plugins/ Enable use of Google Play Services (needed for maps) https://inthecheesefactory.com/blog/how-to-install-google-services-on-gen ymotion/en 26

How to... Write better tests

stump8.deviantart.com

What I don t want to see anymore You moved your tests to proper folders But did not update the package declaration asserttrue(true) or assertequals(true, true) => A test that is not implemented should fail Copy-paste of tests between groups spoiler: it shows 29

The assert* family

Most useful Assert* methods: AssertEquals (expectedvalue, testedvalue); assertequals( star, shape.getid()); assertequals(42.3, point.getx(), 0.01); AssertNull / AssertNotNull assertnull(shapesprovider.findbyid( unknown ); assertnotnull(shapesprovider.findbyid( star ); AssertTrue / AssertFalse asserttrue(shapesprovider.deleteshape( star ); assertfalse(shapesprovider.deleteshape( unknown ); 31

Some more examples USE NOT assertequals(42.3, point.getx(), 0.01); asserttrue(point.getx() == 42.3); USE NOT assertnotequals(shapesprovider.findbyid( star ), shape); assertfalse(shape.equals(shapesprovider.findbyid( star ))); USE NOT assertnotnull(shapesprovider.findbyid( star )); asserttrue(shapesprovider.findbyid( star )!= null); USE NOT assertnull(shapesprovider.findbyid( unknown ); assertequals(null, ShapesProvider.findById( unknown ); 32

Chose wisely! AssertTrue Think about: AssertEquals AssertNull Correctness Readability Extensibility 33

What are unit tests?

What should this methods test? //Method test of createshape from the class ShapeProvider @Test public void testcreateshape() { } //Method test of deleteshape from the class ShapeProvider @Test public void testdeleteshape() { } ShapesProvider.createShape(..) and ShapesProvider.deleteShape(..) 35

What is it ACTUALLY testing? //Method test of createshape from the class ShapeProvider @Test public void testcreateshape() { int nb = allshapes.size(); allshapes.add(new Shape()); assertequals(nb+1,allshapes.size()); } //Method test of deleteshape from the class ShapeProvider @Test public void testdeleteshape() { int nb = allshapes.size(); allshapes.remove(0); assertequals(nb-1, allshapes.size()); } ArrayList.add(..) and ArrayList.remove(..) 36

UNIT Test Test the behavior of a single element (method, class, ) When you test a method, it is a black box You know pre-conditions You know parameters it takes as input You know the exceptions it throws and when You test what it returns, exceptions and post-conditions The implementation of the method should not change the code needed to test it You could write tests BEFORE your write code = Test Driven Development (TDD) 37

What is it ACTUALLY testing? //Method test of createshape from the class ShapeProvider @Test public void testcreateshape() { int nb = allshapes.size(); allshapes.add(new Shape()); assertequals(nb+1,allshapes.size()); } //Method test of deleteshape from the class ShapeProvider @Test public void testdeleteshape() { int nb = allshapes.size(); allshapes.remove(0); assertequals(nb-1, allshapes.size()); } ArrayList.add(..) and ArrayList.remove(..) 38

Makes more sense, doesn t it? //Method test of createshape from the class ShapeProvider @Test public void testcreateshape() { int nb = ShapesProvider. getallshapes().size(); ShapesProvider. createshape(new Shape()); assertequals(nb+1,shapesprovider. getallshapes().size()); } //Method test of deleteshape from the class ShapeProvider @Test public void testdeleteshape() { int nb = ShapesProvider. getallshapes().size(); ShapesProvider. deleteshape(shapesprovider. findshapebyid("star")); assertequals(nb-1, ShapesProvider. getallshapes().size()); } 39

But it s not enough. /** * Definit une nouvelle {@link Shape} dans le service. * * @param shape - L'objet {@link Shape} a ajouter * @throws ShapeAlreadyExistException si une forme avec le meme identifiant etait deja presente. */ public static void createshape(shape shape) throws ShapeAlreadyExistException { if (findshapebyid(shape.getid())!= null) throw new ShapeAlreadyExistException(); else allshapes.put(shape.getid(), shape); } // Our test @Test public void testcreateshape() { int nb = ShapesProvider. getallshapes().size(); ShapesProvider. createshape(new Shape()); assertequals(nb+1,shapesprovider. getallshapes().size()); } Not good enough! But why? 40

Towards more complete tests The Javadoc should be all we need to write the tests! /** * Definit une nouvelle {@link Shape} dans le service. * * @param shape - L'objet {@link Shape} a ajouter * @throws ShapeAlreadyExistException si une forme avec le meme identifiant etait deja presente. */ Parameters: Test edge cases What happens if I give a null Shape, or a Shape with only 1, 2, or no vertex? Should it be added? => Writing tests helps us realize that our documentation, specifications or implementation is not good enough Maybe an InvalidShapeException could be thrown, or a boolean returned as false if the shape was not added bc it was invalid 41

Towards more complete tests The Javadoc should be all we need to write the tests! /** * Definit une nouvelle {@link Shape} dans le service. * * @param shape - L'objet {@link Shape} a ajouter * @throws ShapeAlreadyExistException si une forme avec le meme identifiant etait deja presente. */ Exceptions: Make sure they occur when expected A ShapeAlreadyExistException should be thrown if I add the same shape twice 42

Test exceptions - v0.1 We can create a separate test method for this case! @Test public void testcreatealreadyexistingshape() { // We know star is already in here Shape s = new Shape( star ); try { ShapesProvider. createshape(s); fail( a ShapeAlreadyExistsException should have been thrown ); } catch (ShapeAlreadyExistsException e) { asserttrue(true); } } NO asserttrue(true)!!! 43

Test exceptions - v0.5 We can create a separate test method for this case! @Test public void testcreatealreadyexistingshape() { // We know star is already in here Shape s = new Shape( star ); try { ShapesProvider. createshape(s); fail( a ShapeAlreadyExistsException should have been thrown ); } catch (ShapeAlreadyExistsException e) { // doing nothing has the same result } } Meh... 44

Test exceptions - v1 We can create a separate test method for this case! @Test public void testcreatealreadyexistingshape() { int nb = ShapesProvider. getallshapes().size(); // We know star is already in here Shape s = new Shape( star ); try { ShapesProvider. createshape(s); fail( a ShapeAlreadyExistsException should have been thrown ); } catch (ShapeAlreadyExistsException e) { assertequals(nb+1,shapesprovider. getallshapes().size()); } } That s more like it... 45

Test exceptions - Another way We can create a separate test method for this case! @Test(expected = ShapeAlreadyExistException.class) public void testcreatealreadyexistingshape() { int nb = ShapesProvider. getallshapes().size(); // We know star is already in here Shape s = new Shape( star ); ShapesProvider. createshape(s); } Here, the test will fail if the exception is not thrown, and pass otherwise. The @Test(expected ) shows directly what the test is for It s cleaner and easier to read 46

Semester Timeline

Timeline 3 Sprints: 19/02: Release (sprint-3) + Technical Report 26/03: Release (sprint-4) + Defense (code review) 14/05: Final release (sprint-5) + Demo to the client Organize your sprints as you want don t forget about client value though! 03/01/17 - CC - camillie@i3s.unice.fr 48

Reminders - tools Code hosted on Github Classroom https://classroom.github.com/group-assignment-invitations/79979cffe409d0d68c89b9e72d6599c6 A JenkinsFile for continuous integration http://iut-outils-gl.i3s.unice.fr/jenkins/job/lpidse16-17/job/lpidse16-17/ A new Jira project Reference tasks in commit messages Releases on Github & Jira: sprint-x 03/01/17 - CC - camillie@i3s.unice.fr 49

Sprint 3

How to start Put all your legacy code on the new github repo Describe your code to your teammates Describe your web-services (urls, inputs, outputs) Discuss together what to keep, and how to start Validate this with your coach Take the backlog of all your previous projects Recreate all open tasks on the new board Go from it, sort and redefine them with your team 51

Report - what s expected February 19 before 23:59 Late 0 Location file report.pdf in a docs/ folder on the repo + tag sprint-3. Content Team organization How did you integrate your code? (code review, starting from the database, starting from the desktop before going mobile, integrate one feature at a time at the same time as the mobile interface, etc?) Did your initial plan work out and why? Was is predictable? Difficulties you faced 03/01/17 - CC - camillie@i3s.unice.fr 52

GO!! stump8.deviantart.com

?