The Art of Software Testing

Chapter 10: Testing Internet Applications


Glen Myers
Wiley
Third Edition, 2012





  • Internet applications are essentially client-server applications in which the client is a Web browser, and the server is a Web server or application server (or both)

  • Some companies have applications built for business-to-consumer uses such as banking services and retail stores
    Others have Intranet or business-to-business applications such as supply chain or sales force management

  • The goal of testing Internet-based applications is no different from that of traditional applications
    You need to uncover errors in the application before deploying it to the Internet (or Intranet) and the end user

  • Given the complexity of these applications and the interdependency of the components, you likely will succeed in finding plenty of errors

  • Consumers have developed high expectations
    If your site does not load quickly, respond immediately, and provide intuitive navigation features, chances are that the user will find another company with which to conduct business

    Basic E-Commerce Architecture

  • Three-tier client-server architecture is used in typical Internet-based e-commerce applications

  • Each tier is treated as a black box with well-defined interfaces

  • Most of the access to your applications occurs from a Web browser

  • Testing for browser compatibility is one challenge associated with testing Internet applications

  • Web server represents the first tier (presentation tier) in the three-tier architecture and houses the Website

  • Tier 2, or the business layer, houses the application server
    Here, you run the software that models your business processes

  • Some of the functionality associated with the Business layer:
    Transaction processing
    User authentication
    Data validation

  • The third tier (data layer) focuses on storing and retrieving data from a data source, typically a database management system (DBMS)

    Testing Challenges

  • Some examples of the challenges associated with testing Internet-based applications:

  • Large and varied user base
    The users of your Website possess different skill sets, employ a variety of browsers, and use different operating systems or devices
    You can also expect your customers to access your Website using a wide range of connection speeds

  • Business environment
    A number of external links to third-party servers or databases for calculating taxes, determining shipping costs, completing financial transactions, tracking customer profiles, ....

  • Security
    Because your site is open to the world, you must protect it

  • Configuring a testing environment is one of the most challenging aspects of e-commerce development

  • Significant testing challenge is testing browser compatibility

    Some of the most important areas to test:

  • Ensure documented performance rates are met for response times and throughput rates

  • Ensure database operations meet performance goals

  • Verify that data are stored accurately and correctly

  • Test for proper data encryption and security

  • Some of your testing will focus on usability and human-factor concerns

  • Internet users will not wait long for pages to load or transactions to complete

  • Poor performance may also lead customers to doubt the reliability of your site

  • You should set performance goals
    Then design tests that reveal problems that cause your site to miss the goals

  • In the Internet environment, it is critical to keep the Website available for customer use
    That is, we need high reliability

  • You want to maximize the mean time between failures (MTBF) and minimize the mean time to recovery (MTTR) for these systems

    Testing Strategies

  • You will need precise descriptions of the expected functionality and expected performance of your Website

    Presentation Layer Testing

  • Testing the presentation layer consists of finding errors in the GUI, or front end, of your application

  • Detecting and correcting errors here are critical to presenting a quality, robust Website
    If your customers encounter errors in this layer, they may not return

  • Three major areas of presentation layer testing:

    1. Content testing
    Overall aesthetics, fonts, colors, spelling, content accuracy, default values

    2. Website architecture
    Broken links or graphics

    3. User environment
    Web browser versions and operating system configuration

    Business Layer Testing

  • Finding errors in the business logic of your Internet application

  • Mimic the steps a user performs when purchasing a product or service

  • Certain characteristics of your application that you should always test:

    Performance Testing

  • Test to see whether the application meets documented performance specifications (generally specified in response times and throughput rates)

  • A common approach you may use when evaluating performance is stress testing
    Often, performance degrades to the point of being unusable when the system becomes overloaded with requests

  • Stress testing the application also allows you to investigate the robustness and scalability of your network infrastructure

    Data Validation

  • Test to detect errors in data collected from customers

    Transactional Testing

  • Test to uncover errors in transaction processing -- such things as credit card processing, e-mailing verifications, and calculating sales tax

  • Your e-commerce site must process transactions correctly 100 percent of the time
    No exceptions!
    Customers will not tolerate failed transactions
    Besides a tarnished reputation and lost customers, you may also incur legal liabilities associated with failed transactions

  • In addition to testing internal transaction processes, you must test the external services, such as credit card validation, banking, and address verification
    You typically will use third-party components and well-defined interfaces to communicate with financial institutions when conducting financial transactions
    Don't assume these items work correctly
    You must test and validate that you can communicate with the external services and that you receive correct data back from them

    Data Layer Testing

  • Develop a set of procedures to protect your data storage systems

  • Testing the data layer consists primarily of testing the database management system that your application uses to store and retrieve information

  • One of the biggest challenges associated with testing this layer is duplicating the production environment

    Response Time Testing

  • Focus on identifying database operations that do not meet performance objectives

  • You must have a test environment that matches what you use in production

    Data Integrity Testing

  • Data integrity testing strives to find errors in how you store data

  • Investigate the accuracy of the reference tables used by your application, such as sales tax, zip codes, and time zone information
    Not only must you ensure that this information is accurate, you must keep it up to date

    Fault Tolerance and Recoverability Testing

  • The system must stay up and running

  • Your customers might experience a short service disruption, but the system should remain usable

  • Consider database recovery as equally important

  • A fault-tolerant database system may reside in multiple locations connected over a network