OpenMRS

Android client: Unit tests cannot run because of a deprecated library

When running any unit test that extends ACUnitTestBase, it fails during initialization part. Error:

java.lang.IllegalStateException: Failed to transform class with name com.activeandroid.Cache. Reason: cannot find android.support.v4.util.LruCache

(Full error at https://issues.openmrs.org/browse/AC-635)

Steps to reproduce

  1. Clone the latest master branch version
  2. Run a unit test (e.g. LoginPresenterTest)
  3. Observe the initialization error like above

Expected Outcome

We can run a unit test without encountering this initialization problem.

References

Task tags

  • test
  • android
  • unit test

Students who completed this task

Ishaanndas

Task type

  • code Code
  • done_all Quality Assurance
close

2019