I recently worked on my first complete end-to-end automation for our main application. While I had previously automated smaller modules and basic user flows, this was my first comprehensive test covering the entire user journey. Here is what exactly happened when theory met reality and I found it wasn’t as easy as I had imagined.


Allure Report Updation

  • Problem: Initially when I generated Allure reports, a timeout error occurred, so I fixed it by adding a delay in the script and rerunning it. But guess what? Still I was getting the same error in the report, although the test script ran successfully.
  • Fix: That’s when I realised that it was generating an HTML report based on old Allure results. So I quickly deleted the old Allure results file and reran, and it finally worked.

Frequent Timeout Errors

  • Problem: Despite adding a network idle or a tiny delay, I still had timeout problems after fixing all the code with unique locators.
  • Fix: Adding a small timeout before and after a network idle fixed the issue, which eventually passed all the test cases.
     page.wait_for_timeout(3000)
    page.wait_for_load_state(“networkidle”)
    page.wait_for_timeout(3000)

False Positive Results

  • Problem: It was assuming that it clicked the field, but it was failing during creation since those were required fields, even though I had provided a unique locator and a timeout.
  • Fix: I added a combination of locator with has_text and a proper timeout. This made sure that before clicking, the script waited for the button to appear with the right text before clicking. After this, the click worked as expected and the result was genuine.

Performance Testing with Locust

  • Problem: The endpoint stopped returning a valid JSON response. Earlier, it returned a success message and token, but suddenly it started failing with:

    CatchResponseError(‘Login failed: Non-JSON response’)
  • Fix: After checking with the development team, I learned that, for security reasons, the endpoint no longer accepts credentials. Instead, I used the “UserId” from the payload for verification, which resolved the issue.

Summary
I learnt lessons beyond technical skills from my first end-to-end test experience using Playwright. Solving these problems improved my problem-solving skills and improved my knowledge of the principles of test automation.
This experience highlighted that debugging and troubleshooting are essential automation skills. I’m still learning a lot. I still Google problems when I run across them, and my code is probably not the cleanest. What has changed, though, is that I no longer get scared when things break. I now ask myself, “Okay, what’s actually happening here?” and begin to look into it rather than freaking out.
As a fresher, I came to understand that automation is more than just writing code; it’s also about ensuring that tests are accurate, and significant while gradually gaining the confidence to take on more difficult tasks.

Leave a Reply