简体   繁体   中英

Testing the “proguarded” application

First - I am not trying to actually obfuscate my code, only optimize and shrink.

I have checked android developers site, I have looked through proguard documentation and I've googled for a few hours. But I still can't find a definitive answer - how do I actually test that my application keeps working after being "proguarded"?

There is a way to export it, install manually onto emulator, then run, see if it works, fix something (sometimes in proguard configurations, sometimes in code), re-export, re-install. That's a bit tedious.

Shrinked and optimized application is a totally different thing from the application I've tested. I can't be sure it will work properly with such changes until I actually test it. Not being able to actually test the application I'm going to publish means I'm publishing untested application. Which isn't something I'd want to.

And while I can stay away from the proguard, it does reduce my application's size significantly which isn't something I can ignore.

Edit: I understand now that to test application I just have to run acceptance tests on exported package. But there is still the question - how do I test my proguard configuration?

The same way you tested it before you processed it with ProGuard. You'll find that once you get your configuration right the end result will just need one final test to confirm things before deployment.

But I would obfuscate, which reduces size quite a bit and avoid optimizing which I have had introduce bugs a number of times over the years.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM