Skip to content
idelcano edited this page Nov 29, 2017 · 35 revisions

Welcome to the dhis2-android-sdk wiki!


Sections:


Up


Up


Steps:

Clone the repository in the path of your project:

Add a .gitmodules file with the follow content:

[submodule "sdk"]

`path = sdk`

`url = https://github.com/EyeSeeTea/dhis2-android-sdk`

`branch = development`

end then run: git submodule update

This should clone the repository in a "sdk" folder in the root path of your project.

Add in your settings.gradle the follow lines:

include ':app', ':core'

project(':core').projectDir = new File(settingsDir, 'sdk/core')

And add in app/build.gradle:

dependencies {

`compile project(':core')`

}

Up


Up


How run the test:

For run the instrumental tests is necessary a real android device, or a android emulator connected.

For the unitary tests only is necessary click right button and click on run test.

The instrumental tests are placed in the folder androidTest, and the unitary test in the folder test.

To run the tests:

You can select Whole project in android studio ide to run all the tests. Or select a specify test, class, package, or module, clicking with the right button of the mouse and selecting "run test".

For the instrumental test you need open a virtual machine. (Click on tool, android, and open AVD manager, to configure and launch a android emulator).

Some used these test libraries:

Mockserver:

Moquito:

Up


The sdk is developed using the Test-Driven Development methodology.

The team is following a standard naming test methods and classes.

The most important points are:

The class and test name should be read as a full sentence.

The class should express what the class should be able to do.

And the test should start with a verb.

You can read more about this standards reading the article codurance article.

The internal structure of the test is simple and have three blocks: Given, When, Then.

The sdk is developed using the Test-Driven Development methodology.

Up


Clone this wiki locally