So you want to to use unit testing with Android Studio and you have an old code base that does not follow the standard folder structure of Android Studio.
- You need to create test/java folders in the module you want to test.
-- Tip: use external file explorer (e.g. Mac Finder) to do so outside Android.
- Add this to you module dependencies at build.gradle:
-- compile 'junit:junit:4.12'
- You need to create test/java folders in the module you want to test.
-- Tip: use external file explorer (e.g. Mac Finder) to do so outside Android.
- Add this to you module dependencies at build.gradle:
-- compile 'junit:junit:4.12'
-- Add Junit to the classPath
-- Start Testing!
No comments:
Post a Comment