TGIMBA – Automated Testing With Selenium

Software without automated testing is like a fish dinner without a good wine.  Or perhaps a solo date.  Things that just don’t make sense (at least to me).  Software is much to complex for every possible path to be tested every time manually.   The power, in my opinion, comes from a collection of automated tests that can be run every time an update or change is made to make sure nothing was accidentally broken.

Believe it or not, this happens. I worked on a web team some years back where we would release a set of features only to break them a couple of releases later.  With a large team (as was in this  case) and a lot of pressure to get features out quickly, I am surprised it didn’t happen more often.  Everyone one the team was bright and hard working, so it wasn’t laziness.

Automated testing (in my opinion) is the surest way to ensure release ready software and should be considered by developers as their best tool and friend.  Sadly, it seems like automated testing is an afterthought and not considered a worthy investment of time.

So, as part of my TGIMBA testing strategy, I am using the coolest test package out there for websites – Selenium  (http://www.seleniumhq.org/).  I first saw this at one of my previous jobs.  A group of contractors had come in to overhaul  the website and they used Selenium.  With not a lot of effort, I was able to create tests that run against Chrome  (49.0.2623.87), Firefox (45.01) and Internet Explorer (11).  Many browsers are supported, but I choose these as they tend  to be the three I use.  Firefox is my default, Internet Explorer for work and JavaScript debugging with Visual studio and  Chrome because of its truly awesome debugging tool suite.

To use:

 

 

Please note that  you will need Visual Studio 2015, SQL Server (I used 2014) and each of the three browsers installed on your local box with the appropriate settings.  I have some videos of earlier tests run using the first post of the TGIMBA Selenium code.

My only regret with Selenium (so far) is that I wasn’t able to translate this to the Windows 8.1 and Windows Phone 8.1 clients I put out.  I will revisit this when I put out the Windows 10 and Android clients.

Stay tuned!

References

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s