What I try doing when I'm stuck during Test Automation?

What I try doing when I'm stuck during Test Automation?

In this post, I explain what I usually do when blocked during a Test Automation process.

Pause

The first thing I do when I feel there is no progress at all - even after hours of hard work - is to take a pause and avoid thinking about the problem. I let my brain recover and ignore everything I've been trying.

Do it Manually

As I'm automating a process, I stop coding, do it manually and try to understand what might go wrong first, noting down anything relevant.

Right now, I continue working on the Mobile Automation project using Appium. For me, what often happens is that there is a few errors that sporadically appears. In the automation codes, I can’t really determine the flow because it’s fixed - unless I change them one by one - which is more complex.

Reproduce Error

Therefore, a better way to deal with this situation is to manually look for the errors. In my case, it’s going in the mobile app and try to reproduce it. This requires less effort and is less time consuming because I’m not reading the codes each time and wait for the test to run completely. Even isolating one particular issue might take too much effort, especially at the end of the day or work week.

Once I get to the root of the problem, I note down the solution, for example, the elements locators - in order to continue whenever the error occurs - by clicking on the Try Again button. Once done, I add it to the codes and then run the tests. This helps me avoid plenty of headaches and saves more time especially on the long run.