Test Automation Best Practices

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Test Automation Best Practices

ccox
I am just curious if those of you who have established automation principles wouldn't mind sharing some of your ideologies.  Are you scripts modular and reused throughout multiple test suites..etc  I'm trying to understand best practices for the automation industry and make sure I keep up to date on them.  
Reply | Threaded
Open this post in threaded view
|

Re: Test Automation Best Practices

softwaretestingforum
Administrator
Let me share what has proved fruitful for me in terms of test design. But will not call them  best practice as what fits my need may not be suitable for others -

1. Using page object to share page operations across test class. Notice that page object is tool agnostic approach hence it is not limited to be used just with Selenium

2. Externalize test data to text/csv file so that it could be modified with out having to modify source code.

3. Using Single Responsibility Principle to make sure that one class is not responsible for multiple application features. This greatly helps in neat code. Wiki has more on this.

4. Talking specifically about Selenium - Using element locators which work across browsers for example css nth-child and nth-of-type are not supported in all IE versions

This is only what I have on my mind right now.

 
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Test Automation Best Practices

ccox
Thanks Tarun, I apparently still have a ton to learn.

I am currently working with Selenium IDE mostly, but dabbling in RC.  As far as externalizing test data, I currently use my user-extension.js file and have some commands where I use arrays with 5000+ users and attributes and randomly take one from the list and type it in.  Is there a way to externalize these users into a CSV file or something of the sort for IDE?
Reply | Threaded
Open this post in threaded view
|

Re: Test Automation Best Practices

softwaretestingforum
Administrator
I don't use IDE per se, but came across this post which might  help -

http://selftechy.com/2011/06/30/parameterization-of-tests-in-selenium-ide

I would also suggest to dabble in to Selenium 2 than RC as you are beginning with it. You may find upcoming meet on 3rd of June fruitful too where I would begin with Selenium 2
~ seleniumtests.com