Becoming a better Tester!
December 5, 2020
⌚ : 4 min
                                     Click to find relevant articles:

Identify issues faster with logs!

You are in the midst of exploring the mobile app when it suddenly crashes.

You don’t recollect what sequence of actions exactly made it crash. You try to remember and execute the same steps again but in vain. The app doesn’t crash anymore!

Things going on in your mind :

How would you identify what had caused the crash? What if it doesn’t crash anymore? What if you missed keeping track of the steps you performed on the system/app?

What should you decide?

Ignore the crash? Keep on trying to execute a similar behaviour on a different device or as a different user? Reinstall the app?

If you ignore it or consider that the crash was a rare one - you ignore the risk.

But what if 10% of the live customer base were to encounter this crash?

The app can still end up with bad ratings!

Looking into logs/logging :

Have you ever had a look at the log files for your application? Do you notice which events are mostly fired in the production environment? This is especially relevant if users are facing any issue very frequently in the production environment. Which errors or what exactly in the device is causing that crash - was it a camera or a biometric event or an API call or the network!? Was it an unhandled exception within that new version of a third-party library?

Did the system recover on its own after the exception occurred? Incidentally, that could be a root cause of a critical issue later on.

Logging/logs can be the saviour here. A Logfile helps you piece together this information.

Never miss the chance to review the logs and to monitor alerts.

What’s all the buzz about logging!?:

Logs point out the Problems or threats/suspicious activity if any.

As soon as the crash happens - you can check the space where logs get generated (if the user gave permission).

If written well and with the right planning, logs can give you the exact crash details, the steps you followed and the errors that the app may have gone through before crashing.

What Logs contain or should contain:

The debug/info/error logs, or the crash logs should give a clue about :

Such information makes it easy to analyse the issue.

If your application’s logs are high level with just a crash message and no diagnostic info or messages being logged (this can be verified by changing the logging level to debug, error, info, warn), then you will be limited in what info you can provide to the devs. You can always ask Devs for extra logging and diagnostic information which will help you analyse the logs and speed up the root cause identification process. Nowadays, there are libraries, OS facilities as well as third-party tools that devs can leverage to log diagnostic data. E.g. Firebase, BugSnag, AppCenter for AzureDevOps, Google Analytics, Oracle Infinity and so on..

Benefits Log Files serve:

The sequence of steps that we follow in generating the crash is important and logs help us understand the same.

With well-written logs you don’t have to remember what you did, logs capture it all for you. Logs help you find the root cause of the bugs. To understand the user in a real way. To get real-time feedback. To improve the testing.

Use logs as a tool to ease up the Testing and to work with users and devs to arrive at the root-cause and get a fix sooner!

Connect / Follow me

I work on everything Quality!