What are the best ways to cause Android apps to crash? We are trying to make our app as rock solid as possible.
For my own contribution, if you have an app that uses network services, go into your app with wifi connected and then turn off wifi in various ways. For instance, walking out of range, or backgrounding the app and manually shutting wifi off, then foregrounding the app.
Crashes are inevitable in mobile apps. Sometimes it can be coding issues , poor memory management or sometimes device incompatibility. Users do not tolerate crashes well. The acceptable crash rate per user is less than 1%.
This usually occurs when your Wi-Fi or cellular data is slow or unstable, causing apps to malfunction. Another reason for Android apps crashing can be a lack of storage space in your device. This can occur when you overload your device's internal memory with heavy apps.
Select an app. On the left menu, select Quality > Android vitals > Crashes and ANRs. Near the center of your screen, use the filters to help you find and diagnose issues. Alternatively, select a cluster to get more details about a specific crash or ANR error.
Start your application, carry out some actions, change the orientation multiple times, exit the application. Repeat the process again and again to discover any hidden memory leaks (use a memory profiler).
Use the monkey to find any possible ab-use cases that you have not considered (although he is not available on some Android devices).
From experience, the best way to really test your application is to find yourself a bunch of beta testers who have not been involved in the project (their actions will make you raise an eyebrow - 'You did what!?').
If you are trying to crash intentionally to test services or how the app behaves after a crash then null context it is.
Toast.makeText(null, "Crashed before shown.", Toast.LENGTH_SHORT).show();
You need fast fingers :) just tap very fast on navigation proceed and back buttons, if you have them. I found a lot of crashes using this way.
I'm listing below the ways of crashing app
In addition to the excellent list by Maulik:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With