Web Testing Basics....
Basic E-commerce Architecture
Before explaining the web testing concepts, it is important to understand the basic e-commerce architecture. Most of the websites have a 3-tier client server (c/s) architecture:
~ Tier 1 - Presentation Layer
~ Tier 2 - Business Layer
~ Tier 3 - Data Layer
Figure 1. Basic E-commerce 3-tier Architecture
Presentation Layer (Tier 1)
The first tier houses the website and consists of the look and feel of the application. Since it provides visual content to the end user, it is also called presentation layer. The web server can use static HTML pages or CGI (commom gateway interface) scripts to create dynamic HTML. Most of the times it uses a combination of both.
Business Layer (Tier 2)
The second tier houses the application server. Here you run the software that models your business processes. Some functionalities of business layer are Transaction Processing, User Authentication, Data Validation, Application Logging etc.
Data Layer (Tier 3)
The third tier focusses on storing and retrieving data from a data source which is typically a RDBMS. This tier consists of a database infrastructure to communicate with the second tier. The interface into the data layer is defined by a Data Model, which describes how you want to store data. Sometimes several database servers make up this tier.Some e-commerce sites may place an authentication server in this layer. Generaly an LDAP (Lightweight Directory Application Protocol) Server is used for this function.
Web Testing Challenges
A web based aplication has many failure points which should be considered while framing the testing approach. Following are some challenges to be considered :
Large and Varied user base :
-- Different skillsets of users
-- Different browsers used
-- Different OS or Devices used
-- Wide range of connection speeds
Business Environment :
-- Calculating taxes
-- Determining shipping costs
-- Completing financial transactions
-- Tracking customer profiles
Localizaton issues :
-- Internationalization issues
-- Language translation
-- Tme zone considerations
-- Currency conversion
Testing Environments :
-- Duplicate production environment required
-- Huge costs
-- Not all environments can be duplicated
-- Infrastructure requirements like routers, switches and firewalls
Security :
-- Protection from hackers
-- Data integrity like customr credit card info
-- Protection from denial of service attacks
Web Testing Strategies
Testing web based applications is best tackled by test segmentation. Architecture of internet applications allows to identify discrete areas to target testing. Internet applications are considered as three tiered client server applications.
Presentation layer : The layer of an internet application that provided GUI for the application. Business Logic Layer : The layer that models business processes such as transaction handling. Data Access Layer : The layer that handles data used by the application or that is collected from the end user.
Testing each tier independently allows to identify bugs and errors before complete system testing begins. The objective of testing is to maximize the Mean Time Between Failures (MTBF) and minimize the Mean Time To Recovery (MTTR).
Presentation Layer Testing
The following identifies the three major areas of presentation layer testing ---
Content Testing : Overall aesthetics , fonts, color, spelling, content accuracy, default values.
Website Architecture : Broken links or graphics missing on the web page.
User Environment : Web browser versions and operating system configuration , browser compatibility testing and browser compatibility issues if Active X controls, Javascript, VBscript or Java applets are used.
Business Layer Testing
Testing this layer is very similar to testingstand alone aplications where both black box and white box techniques can be used. Major testing areas of business layer include ---
Performance :
Test to see wheather the application meets documented performance specifications specified in response times and throughput rates. A common approach for conducting performance tests is stress testing. Stress testing involves blasting the application with multiple logins and simulating transactions to the point of failure so you can determine if your application meets its performance objectives. Stress testing the application also allows you to investigate the robustness and scalability of your network infrastructure.
Data Validity :
Test to detect errors in data collected from customers. Testing for data collection errors is much like searching for user input or parameter errors when testing stand alone applications.
Transaction Testing :
Test to uncover errors in transaction processing, which may include items such as credit card processing, e-mailing verifications and calculating sales tax. Transaction testing can be considered as system testing of the business layer. Typical events that a customer performs in a transaction include the following :
~ Searching inventory
~ Collecting items the user wants to purchase
~ Purchasing items which may involve calculating sales tax and shipping charges as well as processing financial transactions
~ Notifying the user of the completed transaction usually via email
External services such as credit card validation ,banking and address verification must be tested. Typically we use third party components and well defined interfaces to communicate with financial institutions when conducting financial transactions. you must test and validate that you can communicate with the external services and that correct data is received back from them.
Data Layer Testing
Testing of the data layer consists primarily of testing the database management system that your system or application uses to store and retrieve information. In data layer testing following are the areas we should search for errors --
Response Time :
Quantifying completion times for data manipulation language (DML) , SQL inserts, updates and deletes, sql queries, selects and transactions.
Data Integrity :
Verifying that the data is stored correctly and accurately Data integrity testing is the process of fininding inaccurate data in your database tables. you should also investigate the accuracy of the lookup / reference tables used by your application such as sales tax, zip codes, and time zone information. These lookup tables should also be kept up to date to avoid any errors.
Difference between Data Integrity and Data Validation - Data validation testing tries to find errors in data collection. Data Integrity testing strives to find errors in how you store and retrieve the data.
Fault Tolerance and Recoverability :
Testing should be done with the objective of maximizing the mean time between failure (MTBF) so that the system doesn't fail frequently. Also the mean time to recovery (MTTR) should be as less as possible so that in case the system fails it recovers immediately without any loss of information or data.
Go to Top
--- Yogini Kale