Why bother testing your website with Selenium and SpecFlow?

This article is in a series about Selenium and SpecFlow

  1. Introduction
  2. Why bother?
  3. Basic plumbing
  4. Page objects
  5. The engineering behind decent Gherkin files

This is not a general Why bother with testing? post, but instead gives some specific business benefits of testing your site with something like the combination of Selenium and SpecFlow.

  1. You will get a set of automated system regression tests, which means that manual system tests can concentrate on new things and / or devious edge cases that are hard to automate.
  2. Assuming that you have suitable test accounts etc. in the production database and / or a subset of tests that are suitable to be run against a production database, you have a set of automated tests to check a new deployment to production or somewhere similar.  This can be part of an automated CD or CD pipeline.
  3. You can repeat all the tests for different browsers, to test for cross-browser compatibility.  Modern UI frameworks make it easier to write cross-browser code than in the past, but you still need to check your site with the browsers that your users will use.Note that while this gives you extra benefit, it will come at extra cost.  One approach (the simplest) means your tests will take longer because they are iterating over N browsers, doing all the tests for each iteration.  If you have enough machine power at your disposal, you can try executing your tests in parallel – Richard Bradshaw and Simple Programmer have tutorials on that.
  4. An important extra consideration in compatibility testing is screen width, i.e. responsiveness.  Does your site change its behaviour on a mobile or tablet’s browser?  E.g. do menu items get hidden behind a menu button / expand out to being listed in a horizontal menu bar?  Testing across more than one screen width is similar to going across more than one browser, but you need to think about what’s actually valuable to test.  Do you need to test all combinations of browsers and screen widths?  Or just specific browser + width combinations?  Regardless, it would be tedious to do manual testing of all the combinations you’ve chosen, which would make it easy to skip some testing at least some of the time.  Automating the basics will give you at least some confidence reliably.

 

4 thoughts on “Why bother testing your website with Selenium and SpecFlow?

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 )

Connecting to %s