Thursday, March 31, 2016

Selenium WebDriver Automation tests, who would have thought Tooltips can cause issues

This Sprint, my task is to write tests for Scheduled Reports page. When I started planning, I was told to make it resusable so that, one base class can be extended and used by other test classes. I worked on it, nullPointer error time to time initially caused issue for me. I knew what I was doing wrong, but not exactly sure where. I finally got it resolved.

I planned on getting sorted everything today and after executing tests multiple times. I successfully reordered all the tests, and I ran into an error. I didn't what was happening, I ran it over and over, debugged it over and over. The funny thing was, when the test is run alone, it would run successfully. So, I had to watch it carefully, before I caught the issue.

Who would have thought Tooltip in an application would cause issue to the tests. The tooltip showed up and didn't go away from the page, and the test couldn't find the correct button. So, instead of clicking on "Instances" button, it clicked out of the Data Source window. Obviously, it wouldn't find the search window. So, I put a workaround for that as its not an application issue.

As I executed another tests, I found another issue. I manually tried it, I couldn't replicate the issue. I ran the test again and again. That's when I noticed the issue. I showed it to the developer, and he also said, this could be an issue. And I wrote it as a bug. When I ran the test again, I noticed that it sometimes works and sometimes doesn't, as the data table sometimes loads with the Scheduled Reports.

Oh well, around 5pm, I checked in everything, created a Pull Request and was time to get out. I was so stressed all day, my shoulder and back were so stiff. I decided to listen to music and come home. I did laundry, made some food. Stuffed myself with food and now here I am writing about my day. I can only hope, tomororw wil be a better day. Good luck to me..

No comments:

Post a Comment