Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Magium Blog:
3 Best Practices for Selenium Testing when Constructing Your Page
Feb 17, 2016 @ 15:55:26

In a new post to the Magium site Kevin Schroeder shares three helpful tips you can use for the Selenium testing of your application based on some of his recent development on the project.

Having spent now about two months building out Magium there are a couple of things that are worth sharing as I’ve been working through several different versions of Magento. These practices (best practices?) may or may not be “officialized” by the Overlords of the Internet but what I have found is that I have the most trouble when these practices are not executed.

The basic premise behind each of these is that the quickest path to the most specific element is best.

His three tips avoid things like long XPath expressions to locate single items and favor consistency and simplicity:

  • Wrap ALL text in an HTML element – leave no orphaned text
  • If an element has function, identify it.
  • Group data using classes and IDs

He ends the post with a reminder that a well-structured page not only helps with testing but is also a good goal to strive for related to maintainability.

tagged: selenium testing magento tips top3 structure

Link: http://magiumlib.com/blog/3-best-practices-for-selenium-testing-when-constructing-your-page/


Trending Topics: