- Simple dependency injection
- Event-driven program execution
- State dependence in applications
- Mapping the model-view-adapter architecture to Android (and the command-line)
- Android application life cycle management (including rotation and back button)
- Playing a notification sound in Android
- Adapter pattern (wrapper, as opposed to the adapter in MVA)
- Dependency inversion principle (DIP)
- Automated unit and integration testing with JUnit
- Testcase Superclass pattern for xUnit testing
- Automated system testing by interacting with the GUI
- Automated GUI testing in Android
Check out the project using IntelliJ IDEA - this creates the local.properties
file with the required line:
sdk.dir=<root folder of Android Studio's Android SDK installation>
In IntelliJ: Run > Run app
In IntelliJ:
- Before running tests, in the Android view right-click on
edu.luc.etl.cs313 (test)
-Run Tests in ...
- should be one of the visible menu items toward the top, if so, click on that; if
Run Tests in ...
- is not there, go to the next step:
- Now click
Run > Edit Configurations...
and underAndroid JUnit
click oncs313 in app
- On the Configuration tab, click the far-right icon in the Working Directory row and select
MODULE_DIR
, then clickOK
- If you do not do this, running the unit tests from the Android view will not work!
- Finally, right-click on
edu.luc.etl.cs313 (test)
, then chooseRun Tests in ...
You can also use Gradle in a Terminal window:
$ ./gradlew testDebug
You can view the resulting test reports in HTML by opening this file in your browser:
app/build/reports/tests/testDebugUnitTest/index.html
In Gradle:
$ ./gradlew jacocoTestDebugUnitTestReport
You can view the resulting test reports in HTML by opening this file in your browser:
app/build/reports/jacoco/jacocoTestDebugUnitTestReport/html/index.html
In IntelliJ:
- In the Android view, right-click on
edu.luc.etl.cs313... (androidTest)
, then chooseRun Tests in 'edu.luc.etc...'
You can also use Gradle in a Terminal window:
$ ./gradlew connectedDebugAndroidTest