Asking behavior change to allow easier testing



  • I'm a QA engineer (the first and only one in my workplace) and I'm trying to automatize tests using Selenium + Java.

    I'm working on an application where there is a calendar use to select the user birthdate.

    In order to enter the birthdate, you have to click on a calendar picture (which will display a bigger calendar), then click on a year, then click on a month, then click on a day. So, it's a minimal of 4 clicks (but you are probably going to need more in order to select your correct birthdate).

    I'm kind of new to Selenium, but since there aren't any ids on the calendar (nor name), I already know that I will need quite some time in order to automatize this (directly entering the birthdate is impossible).

    Knowing this, would it be reasonable for me to ask (and push hard) so that the behavior of the application will change and would allow users (and me) to directly enter there birthdate?

    And is there something I didn't think of that will allow me to more easily select the date on the calendar without changing the application behavior? Like making java change the html in order to enable the input linked to the calendar (so as to allow me to directly enter the birthdate)?



  • You should always be able discuss making the application more testable. Even better might be to pair implement the test with a developer, so they can feel the struggles. In agile teams creating enough test coverage is a shared responsibility. Working closer with developers is a must in my book, but also letting them implement and maintain end-2-end tests as well.

    From a technical perspective, the calendar eventually populates a hidden input field. Try to fill the field with the JavascriptExecutor. I would only do this if the calendar widget is part of a well tested framework/library. If it is a custom inhouse widget I would prefer to have some tests use the actual component.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2