Test dropdown creation in several pages



  • Currently I am writing tests for a web application using Selenium, when a question popped in my mind. Since this is my first time with Selenium, I'd wish to have some help on it.

    I have to test the creation and the functionality of a dropdown select list that will assign a ticket to a manager.
    I have several different pages where this dropdown is displayed, my question is: should I test the functionality of the select list in every page?

    I know (as programmer) that the code is the same in every page (actually the code is copied, we're creating tests in order to refactor safely and remove code duplication...), but the test doesn't, since it can only see the results on the page.

    So, testing it on every page is an overkill or it's something required?



  • Yes you should for the fact that it is "copied". Sure it is supposed to stay the same but if it is not the exact same code there is no guarantee that someone will not change the implementation.

    Write a test for that and then recall the same test method in every place instead of duplicating the test steps in every place. This will ensure it remains consistent.

    Also if the control ever gets replaced in one place or another it will show that one of them is now different than before...which based on your writeup it shouldn't be different.


Log in to reply
 

Suggested Topics

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