In this article, we will learn web application testing with test cases for testing a website.
I always love to share practical knowledge, which in a case can be useful to several users in their career life. This is quite a lengthy article, so sit back and get relaxed to get most out of it.
1) Functionality Testing
2) Usability testing
3) Interface testing
4) Compatibility testing
5) Performance testing
6) Security testing
#1) Functionality Testing
Test for – all the links in web pages, database connection, forms used for submitting or getting information from the user in the web pages, Cookie testing etc.
Check all the links:
Test forms on all pages:
Forms are an integral part of any website. Forms are used for receiving information from users and to interact with them. So what should be checked in these forms?
Let’s take an example of the search engine project currently I am working on, in this project we have advertiser and affiliate signup steps. Each sign-up step is different but its dependent on the other steps.
So sign up flow should get executed correctly. There are different field validations like email Ids, User financial info validations etc. All these validations should get checked in manual or automated web testing.
Cookies are small files stored on the user machine. These are basically used to maintain the session- mainly the login sessions. Test the application by enabling or disabling the cookies in your browser options.
Test if the cookies are encrypted before writing to the user machine. If you are testing the session cookies (i.e. cookies that expire after the session ends) check for login sessions and user stats after the session ends. Check effect on application security by deleting the cookies. (I will soon write a separate article on cookie testing as well)
Validate your HTML/CSS:
If you are optimizing your site for Search engines then HTML/CSS validation is the most important one. Mainly validate the site for HTML syntax errors. Check if the site is crawlable to different search engines.
Data consistency is also very important in a web application. Check for data integrity and errors while you edit, delete, modify the forms or do any DB related functionality.
Check if all the database queries are executing correctly, data is retrieved and also updated correctly. More on database testing could be a load on DB, we will address this in web load or performance testing below.
In testing the functionality of the websites the following should be tested:
i. Internal Links
ii. External Links
iii. Mail Links
iv. Broken Links
i. Field validation
ii. Error message for wrong input
iii. Optional and Mandatory fields
Testing will be done on the database integrity.
#2) Usability Testing
Usability testing is the process by which the human-computer interaction characteristics of a system are measured, and weaknesses are identified for correction.
• Ease of learning
• Subjective user satisfaction
• General appearance
Test for navigation:
Navigation means how a user surfs the web pages, different controls like buttons, boxes or how the user uses the links on the pages to surf different pages.
Usability testing includes the following:
Content should be logical and easy to understand. Check for spelling errors. Usage of dark colors annoys the users and should not be used in the site theme.
You can follow some standard colors that are used for web page and content building. These are the commonly accepted standards like what I mentioned above about annoying colors, fonts, frames etc.
Content should be meaningful. All the anchor text links should be working properly. Images should be placed properly with proper sizes.
These are some of the basic important standards that should be followed in web development. Your task is to validate all for UI testing.
Other user information for user help:
Like search option, sitemap also helps files etc. The sitemap should be present with all the links in websites with a proper tree view of navigation. Check for all links on the sitemap.
“Search on the site” option will help users to find content pages that they are looking for easily and quickly. These are all optional items and if present they should be validated.
#3) Interface Testing
In web testing, the server side interface should be tested. This is done by verifying that communication is done properly. Compatibility of the server with software, hardware, network, and the database should be tested.
The main interfaces are:
Check if all the interactions between these servers are executed and errors are handled properly. If database or web server returns an error message for any query by application server then application server should catch and display these error messages appropriately to the users.
Check what happens if the user interrupts any transaction in-between? Check what happens if the connection to the web server is reset in between?
#4) Compatibility Testing
Compatibility of your website is a very important testing aspect. See which compatibility test to be executed:
In my web-testing career, I have experienced this as the most influencing part of web site testing.
Some applications are very dependent on browsers. Different browsers have different configurations and settings that your web page should be compatible with.
Your website coding should be a cross-browser platform compatible. If you are using java scripts or AJAX calls for UI functionality, performing security checks or validations then give more stress on browser compatibility testing of your web application.
Test web application on different browsers like Internet Explorer, Firefox, Netscape Navigator, AOL, Safari, Opera browsers with different versions.
Some functionality in your web application is that it may not be compatible with all operating systems. All new technologies used in web development like graphic designs, interface calls like different API’s may not be available in all Operating Systems.
Hence test your web application on different operating systems like Windows, Unix, MAC, Linux, Solaris with different OS flavors.
We are in the new technology era. So in future Mobile browsing will rock. Test your web pages on mobile browsers. Compatibility issues may be there on mobile devices as well.
If you are giving page-printing options then make sure fonts, page alignment, page graphics etc., are getting printed properly. Pages should fit to the paper size or as per the size mentioned in the printing option.
#5) Performance testing
The web application should sustain to heavy load. Web performance testing should include:
Test application performance on different internet connection speed.
Web load testing: You need to test if many users are accessing or requesting the same page. Can system sustain in peak load times? The site should handle many simultaneous user requests, large input data from users, simultaneous connection to DB, heavy load on specific pages etc.
Web Stress testing: Generally stress means stretching the system beyond its specified limits. Web stress testing is performed to break the site by giving stress and its checked as for how the system reacts to stress and how it recovers from crashes. Stress is generally given on input fields, login and sign up areas.
In web performance, testing website functionality on different operating systems and different hardware platforms is checked for software and hardware memory leakage errors.
Performance testing can be applied to understand the web site’s scalability or to benchmark the performance in the environment of third-party products such as servers and middleware for potential purchase.
Tested on various networks like Dial-Up, ISDN etc.
i. What is the no. of users per time?
ii. Check for peak loads and how the system behaves
iii. Large amount of data accessed by user
i. Continuous Load
ii. Performance of memory, CPU, file handling etc..
#6) Security Testing
Following are some of the test cases for web security testing:
The primary reason for testing the security of a web is to identify potential vulnerabilities and subsequently repair them.
• Network Scanning
• Vulnerability Scanning
• Password Cracking
• Log Review
• Integrity Checkers
• Virus Detection
The websites are essentially client/server applications – with web servers and ‘browser’ clients.
Additionally, there are a wide variety of servers and browsers with various versions of each. They include small but sometimes significant differences between them in terms of variations in connection speeds, rapidly changing technologies, and multiple standards & protocols. The end result of which testing for websites can become a major ongoing effort.
Few other considerations to be included while testing a website are given below.