Mutation testing framework for Android binaries using Alpakka.
cd apps/MyApplication
./gradlew assembleDebug
cp app/build/outputs/apk/debug/app-debug.apk ../../InputSources/app-debug.apkInstall dependencies:
npm installCompile the TypeScript source and run Alpakka on the input APK:
npm run build
npm run runThe input APK is read from InputSources/ and the mutated APK is written to mutated-app.apk.
These only need to be done once.
Build and install the test APK:
cd apps/MyApplication
./gradlew assembleDebugAndroidTest
adb install app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apkSign and install the mutated APK, then run the tests:
zipalign -p -f 4 mutated-app.apk mutated-app-aligned.apk
apksigner sign --ks ~/.android/debug.keystore --ks-pass pass:android mutated-app-aligned.apk
adb install -r mutated-app-aligned.apk
adb shell am instrument -w \
-e class com.example.myapplication.MainActivityInstrumentedTest \
com.example.myapplication.test/androidx.test.runner.AndroidJUnitRunner