Automated Web Testing
There has always been enormous pressure on software organisations to meet delivery deadlines with static or even reduced Quality Assurance (QA) resources. In your time being a QA person, have you ever worked in a project where the development dates have shifted to the right on a project plan? The very first thing that usually happens in such instances is to reduce the testing time! The financial pressures demand cost and resource reductions. This results in an increased risk of software failure. On the other hand, there is always a lot of pressure to deliver new functionalities to keep ahead of the competition. Delivering a bug free system demands good test coverage. Manual software testing with good test coverage is a labour intensive task. This is where the automated testing comes into the picture: to achieve desired quality goals within the constraints of time and money. I must emphasise here that the primary goal of automation should be to increase the test coverage and hence the quality, not to cut testing costs.
Once automated tests are created they can easily be repeated to perform frequent regression testing as and when required. Sanity automated tests can be shared with the development team to execute before the builds are made available to the QA team.
You will find a lot of books which go through mainly theoretical aspects of automation and provide just a few examples on how actually automation is performed. There is a famous saying “In theory, theory and practice are the same. In practice, they are not”, so I thought I should write a book which explains how automation is practically done rather than just explaining it in theory. We shall go through various aspects of automation with a demo website as we progress through the book.
The book is divided into eight chapters as follows:
- Chapter 1, Getting Started, introduces reasons to use automation in testing. It highlights reasons why to avoid “Record and Playback” approach. It also summarises the main reasons to automate our testing and provides golden rules for you to follow when automating tests. It goes through a typical 3-Tier Website Architecture.
- Chapter 2, Automation Approach, covers the importance of having a framework, which is the driving force behind a successful automation. It looks at the software you will need to set up the Automation Framework, and one piece of good news is that all of this is freeware! It also discusses the components of an Automation Framework. A demo website has been created to help you go through practical examples listed in the book. We will setup the project structure required to create our Automation Framework.
- Chapter 3, Let’s Automate, starts with creating our first automated test. We will expand our Automation Framework to add a number of important features to the framework such as logging to a console, files (so that you can refer back when required), saving a screenshot etc. The chapter also covers how to automate data entry, verification and negative tests.
- Chapter 4, Automate With Databases, covers automating the tabular and summary reports using the demo website. We will also expand our Automation Framework to create a test result summary file at the end of test execution.
- Chapter 5, Data Driven Testing, describes how to perform data driven testing using external data files (instead of using hard-coded data in the test). We will cover both XLS and XLSX Excel formats for automation purpose. Before we finish this chapter, we will add more features to the Automation Framework i.e. adding a test step failure threshold, logging failed test steps only and comparing decimal numbers with a defined tolerance.
- Chapter 6, Cross Browser Testing, covers testing our demo website with diﬀerent browsers. We will cover Mozilla Firefox, Google Chrome, Internet Explorer, Microsoft Edge, Safari and Opera web browsers. Before we finish this chapter, we will add further features to the Automation Framework e.g. testing on diﬀerent environments and logging useful system information during the test execution.
- Chapter 7, Web Services Testing, deals with automating the testing of web services. We will write a sample working web service and automate its testing via diﬀerent methods, namely WebRequest, HttpWebRequest and Service Reference.
A unique step by step guide for testers to perform Automated Web Testing.