Professional Documents
Culture Documents
Testing: Three Tiers Android Testing Pyramid
Testing: Three Tiers Android Testing Pyramid
Unit tests:
Unit tests are the fastest and least expensive tests you can write. They should cover
most if not all of your applications logic (but not its dependencies).
Code:
compilefileTree(dir:'libs',include:['*.jar'])
testCompile'junit:junit:4.12'
Integration tests:
Integration tests validate how your code interacts with other parts of the system but
without the added complexity of a UI framework
Code:
buildTypes
{
release {
minifyEnabledfalse
proguardFilesgetDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
UI tests:
UI tests are the slowest and most expensive kind of test. They are slow because you
must deploy your app to an emulator or device and drive it using the UI. They are
expensive because this often means maintaining an internal device lab and CI server,
or paying for a cloud testing service
Code
compile 'com.android.support:appcompatv7:24.2.1'
compile'com.android.support:recyclerviewv7:24.2.1'
compile'com.android.support:design:24.2.'
compile'com.android.support:supportv4:24.2.1'
Debugging
Android Studio provides a debugger that lets you to find the errors in the
selected part of your code as following:
Select breakpoints in your java code
Examine variables and evaluate expressions at runtime
android {
buildTypes {
customDebugType {
debuggable true
...
}
}
}
4.2Modules:
Different modules of turnout app are: