No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
gradle/wrapper
.bintray-descriptor.json
.gitignore
.travis.yml
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Travis-CI Build Status BuddyBuild Status Bitrise Build Status Download from Bintray License

codecov.io Codacy Badge codebeat badge

Pull requests closed in Issues closed in Average time to resolve an issue Percentage of issues still open

Learning Objectives

  • 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

Setting up the Environment

Check out the project using Android Studio. If AS asks you if you want to create the project, say No and then Open the project from the directory where it was downloaded. This creates the local.properties file with the required line:

sdk.dir=<root folder of Android Studio's Android SDK installation>

Running the Application (in an emulator or connected Android device)

In Android Studio: Run > Run app

Running the Tests

Unit tests including out-of-emulator system tests using Robolectric

In Android Studio:

  • Before running tests, in the Android view right-click on edu.luc.etl.cs313 (test) - if Select ... is one
  • of the visible menu items about 2/3 of the way down, click on that; if Select ... is not there, go to the next step
  • Now click Run > Edit Configurations... and under Android JUnit click on cs313 in app
  • On the Configuration tab, click the far-right icon in the Working Directory row and select MODULE_DIR, then click OK
  • 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 choose Run 'Tests in ...

You can also use Gradle in a Terminal window:

$ ./gradlew testDebug # leave out "./" on the Windows command line

You can view the resulting test reports in HTML by opening this file in your browser:

app/build/reports/tests/testDebugUnitTest/index.html

Unit test code coverage

In Gradle:

$ ./gradlew jacocoTestDebugUnitTestReport # leave out "./" on the Windows command line

You can view the resulting test reports in HTML by opening this file in your browser:

app/build/reports/jacoco/jacocoTestDebugUnitTestReport/html/index.html

Android instrumentation tests (in-emulator/device system tests)

In Android Studio:

  • In the Android view, right-click on edu.luc.etl.cs313... (androidTest), then choose Run 'Tests in 'edu.luc.et...'

You can also use Gradle in a Terminal window:

$ ./gradlew connectedDebugAndroidTest # leave out "./" on the Windows command line