Web Application Testing I Complete Guide for Beginners I How To Test A Website

51Testing October 20 2022
  • #web testing
  • #security testing
  • #performance testing

share

Without a rigorous control process in web-based system development, we may encounter serious problems in developing, releasing, implementing and maintaining the system, and the potential for failure is high. And, as Web-based systems become more complex, the failure of a project will likely lead to many problems. When this happens, our confidence in the Web and the Internet may be irretrievably shaken, causing a Web crisis. The Web crisis may be more severe and widespread than the software crisis faced by software developers.

The testing, validation and acceptance of web-based systems is an important and challenging task in the web engineering process. Web-based system testing differs from traditional software testing in that it is not only necessary to check and verify that the system works as designed, but also to test that the system is displayed appropriately on the browser of different users.

Importantly, security testing and usability testing are also required from the end-user's point of view. However, the unpredictable nature of the Internet and Web media makes it difficult to test Web-based systems.

Therefore, we must investigate new methods and techniques for testing and evaluating complex Web-based systems. Whereas the release cycle for general software is measured in months or years, the release cycle for Web applications is measured in days or even hours. Web testers have to deal with shorter release cycles. Testers and test managers are faced with a shift from testing traditional C/S architectures and frameworks to testing rapidly changing web applications.

web application testing types

Functional testing

1. Link testing

Link is a key feature of Web applications and is the primary means of switching between pages and directing users to pages whose addresses they do not know. Link testing can be divided into three parts. Firstly, it tests whether all links actually link to the page as indicated; secondly, it tests whether the linked page exists; and finally, it ensures that there are no isolated pages on the Web application system. By isolated pages it is meant that there is no link pointing to the page and that it can only be accessed if the correct URL address is known. Link testing can be automatically performed and many tools are now available for this purpose. Link testing must be done during the integration testing phase, i.e. after all pages of the web application have been developed.

2. Form testing

When users submit information to the web application system administrator, they need to use form operations, such as registration, login, information submission, etc. In this case, we must test the integrity of the submitted operation to verify the correctness of the information submitted to the server. For example, whether the date of birth and occupation entered by the user are appropriate, whether the province entered matches the city, etc. If default values are used, the correctness of the default values must also be checked. If the form can only accept certain values as specified, then this is also tested. For example, if you can only accept certain characters, you can skip them when testing to see if the system will report an error.

3. Cookies test

Cookies are usually used to store user information and user actions in an application. When a user accesses an application using cookies, the web server sends information about the user, and storing the information as cookies on the client computer, which can be used to create dynamic and custom pages or to store information such as logins. If a web application uses cookies, it is important to check that they are working properly. Tests include whether the cookies are working, whether they are being saved for a predetermined amount of time, how refreshing affects cookies, etc.

4. Programming language testing

Differences in web programming languages can cause serious problems on the client or server side, such as which version of HTML to use. This issue is particularly important when developing in a distributed environment where developers are not all together. In addition to the HTML version issue, different scripting languages such as Java, JavaScript, ActiveX, VBScript or Perl also have to be validated.

5. Database testing

In Web application technology, databases play an important role. Databases provide space for the management, operation, querying and realisation of user requests for data storage. In Web applications, the most common type of database is a relational database, which can use SQL to process information. In web applications where databases are used, two types of errors can generally occur, namely data consistency errors and output errors. Data consistency errors are mainly caused by incorrect information submitted by the user, while output errors are mainly caused by network speed or programming problems, etc. For these two cases, they can be tested separately.

web application testing techniques

Performance Testing

1. Connection speed test

The speed at which a user connects to a web application varies depending on how they access the internet, they may be on telephone dial-up or broadband. When downloading a program, users can wait longer, but this is not the case if they are just visiting a page. If the Web system takes too long to respond (more than five seconds, for example), users will leave because they do not have the patience to wait. Also, some pages have a timeout limit and if the response time is too slow, the user may need to log in again before they have a chance to view the content. Also, too slow a connection can cause data loss, leaving users without access to the actual page.

2. Load Testing

Load testing is designed to measure the performance of a Web system at a certain load level to ensure that the Web system is working properly within the requirements. The load level can be the number of users accessing the Web system at the same time at a given moment, or the number of online data processing. For example, how many users can the web application allow to be online at the same time? What happens if this number is exceeded and can the web application handle requests for the same page from a large number of users?

3. Stress test

Load testing should be arranged after the Web system has been released and tested in an actual network environment. The number of an enterprise's staff, especially the project team, is always limited, and the number of requests a Web system can handle at the same time will far exceed this limit, so the results will only be correct and credible if it is tested on the actual Internet. Conducting stress tests mean breaking a web application and testing the reflection of the system. Stress testing is testing the limits and fault resilience of the system, that is, testing whether the web application will crash and under what conditions. Areas for stress testing include forms, login and other messaging pages, etc.

Usability testing

1. Navigation testing

Navigation describes the way in which users operate within a page, between different user interface controls such as buttons, dialog boxes, lists and windows; or between different linked pages. It is possible to decide whether a Web application is easy to navigate by considering the following questions:

● Is the navigation intuitively clear?

● Are the main parts of the Web system accessible through the home page?

● Does the Web system need a site map, search engine or other navigation aid?

Putting too much information on one page can often have the opposite effect of what is intended. Users of web applications tend to be purpose-driven, scanning a web application quickly to see if there is information that meets their needs, and leaving quickly if there is not. Few users are willing to take the time to familiarise themselves with the structure of a Web application.

It is therefore important that web application navigation is as accurate as possible. Another important aspect of navigation is the consistency of the style of the Web application's page structure, navigation, menus and links. Make sure that users know intuitively whether there is content inside the Web application and where it is located. Once the hierarchy of the Web application has been decided, start testing the user navigation function, and it will be more effective to involve the end user in this testing.

2. Graphic test

In a Web application system, appropriate images and animations can serve both as advertising and to beautify the page. A Web application's graphics include pictures, animations, borders, colours, fonts, backgrounds, buttons, etc. The graphics test should include:

(1) Make sure that the graphics have a clear purpose and that images or animations are not piled up haphazardly so as not to waste transfer time. web application graphics should be as small as possible and should clearly illustrate something, usually linking to a specific page.

(2) Verify that the style of fonts is consistent across all pages.

(3) The background colour should match the font colour and foreground colour.

(4) The size and quality of the image is also a very important factor, usually using JPG or GIF compression.

3. Content testing

Content testing is used to check the correctness, accuracy and relevance of the information provided by the web application. The correctness of information refers to whether the information is reliable or misrepresented. For example, incorrect prices in a product price list can cause financial problems or even lead to legal disputes; the accuracy of information refers to whether there are grammatical or spelling errors. This test is usually carried out using word processing software; the relevance of the information refers to whether a list or portal of information currently being viewed can be found on the current page, which is generally known as a "list of related articles" on a Web site.

4. Interface test

The overall interface refers to the entire Web application system page structure design, which is to give the user a sense of the whole. For example, when users browse the Web application system, do they feel comfortable and intuitively know where the information they are looking for is located? Is the design style of the entire web application consistent? The process of testing the overall interface is in fact a survey to the end user. Generally web applications take the form of a questionnaire on the homepage to get feedback from end users. For all usability testing, the involvement of external parties (those with no or little contact with the web application development) is required, preferably the end users.

Client-side compatibility testing

1. Operating System Testing

There are many different types of operating systems on the market, the most common being Windows, Unix, Macintosh, Linux, etc. Exactly which operating system is used by the end user of the web application depends on the configuration of the user's system. In this way, compatibility issues can occur and the same application may work fine under some operating systems, but may fail under another. Therefore, before a Web system is released, it needs to be tested for compatibility under various operating systems.

2. Cross-browser testing

Browsers are the core building block of a Web client. Browsers from different vendors have different support for Java, JavaScript, ActiveX, plug-ins or different HTML specifications. For example, ActiveX is a product of Microsoft and is designed for Internet Explorer, JavaScript is a product of Netscape, Java is a product of Sun and so on. Also, frames and hierarchy styles are displayed differently in different browsers, or not at all. Different browsers also have different settings for security and Java. One way to test browser compatibility is to create a compatibility matrix. In this matrix, different manufacturers and versions of browsers are tested for their adaptability to certain building blocks and settings.

web application testing methodology

Security testing

The main areas of security testing for Web application systems are:

1. Web application systems nowadays basically use the registration first and login later. Therefore, valid and invalid usernames and passwords must be tested, noting whether they are case-sensitive, the limit of how many times they can be tried, whether they can browse a page directly without logging in, etc.

2. Whether the Web application system has a timeout limit, that is, whether the user needs to log in again after logging in for a certain period of time (e.g. 15 minutes) without clicking on any page, etc.

Web Application Testing I Complete Guide for Beginners I How To Test A Website
51Testing October 20 2022

Without a rigorous control process in web-based system development, we may encounter serious problems in developing, releasing, implementing and maintaining the system, and the potential for failure is high. And, as Web-based systems become more complex, the failure of a project will likely lead to many problems. When this happens, our confidence in the Web and the Internet may be irretrievably shaken, causing a Web crisis. The Web crisis may be more severe and widespread than the software crisis faced by software developers.

The testing, validation and acceptance of web-based systems is an important and challenging task in the web engineering process. Web-based system testing differs from traditional software testing in that it is not only necessary to check and verify that the system works as designed, but also to test that the system is displayed appropriately on the browser of different users.

Importantly, security testing and usability testing are also required from the end-user's point of view. However, the unpredictable nature of the Internet and Web media makes it difficult to test Web-based systems.

Therefore, we must investigate new methods and techniques for testing and evaluating complex Web-based systems. Whereas the release cycle for general software is measured in months or years, the release cycle for Web applications is measured in days or even hours. Web testers have to deal with shorter release cycles. Testers and test managers are faced with a shift from testing traditional C/S architectures and frameworks to testing rapidly changing web applications.

web application testing types

Functional testing

1. Link testing

Link is a key feature of Web applications and is the primary means of switching between pages and directing users to pages whose addresses they do not know. Link testing can be divided into three parts. Firstly, it tests whether all links actually link to the page as indicated; secondly, it tests whether the linked page exists; and finally, it ensures that there are no isolated pages on the Web application system. By isolated pages it is meant that there is no link pointing to the page and that it can only be accessed if the correct URL address is known. Link testing can be automatically performed and many tools are now available for this purpose. Link testing must be done during the integration testing phase, i.e. after all pages of the web application have been developed.

2. Form testing

When users submit information to the web application system administrator, they need to use form operations, such as registration, login, information submission, etc. In this case, we must test the integrity of the submitted operation to verify the correctness of the information submitted to the server. For example, whether the date of birth and occupation entered by the user are appropriate, whether the province entered matches the city, etc. If default values are used, the correctness of the default values must also be checked. If the form can only accept certain values as specified, then this is also tested. For example, if you can only accept certain characters, you can skip them when testing to see if the system will report an error.

3. Cookies test

Cookies are usually used to store user information and user actions in an application. When a user accesses an application using cookies, the web server sends information about the user, and storing the information as cookies on the client computer, which can be used to create dynamic and custom pages or to store information such as logins. If a web application uses cookies, it is important to check that they are working properly. Tests include whether the cookies are working, whether they are being saved for a predetermined amount of time, how refreshing affects cookies, etc.

4. Programming language testing

Differences in web programming languages can cause serious problems on the client or server side, such as which version of HTML to use. This issue is particularly important when developing in a distributed environment where developers are not all together. In addition to the HTML version issue, different scripting languages such as Java, JavaScript, ActiveX, VBScript or Perl also have to be validated.

5. Database testing

In Web application technology, databases play an important role. Databases provide space for the management, operation, querying and realisation of user requests for data storage. In Web applications, the most common type of database is a relational database, which can use SQL to process information. In web applications where databases are used, two types of errors can generally occur, namely data consistency errors and output errors. Data consistency errors are mainly caused by incorrect information submitted by the user, while output errors are mainly caused by network speed or programming problems, etc. For these two cases, they can be tested separately.

web application testing techniques

Performance Testing

1. Connection speed test

The speed at which a user connects to a web application varies depending on how they access the internet, they may be on telephone dial-up or broadband. When downloading a program, users can wait longer, but this is not the case if they are just visiting a page. If the Web system takes too long to respond (more than five seconds, for example), users will leave because they do not have the patience to wait. Also, some pages have a timeout limit and if the response time is too slow, the user may need to log in again before they have a chance to view the content. Also, too slow a connection can cause data loss, leaving users without access to the actual page.

2. Load Testing

Load testing is designed to measure the performance of a Web system at a certain load level to ensure that the Web system is working properly within the requirements. The load level can be the number of users accessing the Web system at the same time at a given moment, or the number of online data processing. For example, how many users can the web application allow to be online at the same time? What happens if this number is exceeded and can the web application handle requests for the same page from a large number of users?

3. Stress test

Load testing should be arranged after the Web system has been released and tested in an actual network environment. The number of an enterprise's staff, especially the project team, is always limited, and the number of requests a Web system can handle at the same time will far exceed this limit, so the results will only be correct and credible if it is tested on the actual Internet. Conducting stress tests mean breaking a web application and testing the reflection of the system. Stress testing is testing the limits and fault resilience of the system, that is, testing whether the web application will crash and under what conditions. Areas for stress testing include forms, login and other messaging pages, etc.

Usability testing

1. Navigation testing

Navigation describes the way in which users operate within a page, between different user interface controls such as buttons, dialog boxes, lists and windows; or between different linked pages. It is possible to decide whether a Web application is easy to navigate by considering the following questions:

● Is the navigation intuitively clear?

● Are the main parts of the Web system accessible through the home page?

● Does the Web system need a site map, search engine or other navigation aid?

Putting too much information on one page can often have the opposite effect of what is intended. Users of web applications tend to be purpose-driven, scanning a web application quickly to see if there is information that meets their needs, and leaving quickly if there is not. Few users are willing to take the time to familiarise themselves with the structure of a Web application.

It is therefore important that web application navigation is as accurate as possible. Another important aspect of navigation is the consistency of the style of the Web application's page structure, navigation, menus and links. Make sure that users know intuitively whether there is content inside the Web application and where it is located. Once the hierarchy of the Web application has been decided, start testing the user navigation function, and it will be more effective to involve the end user in this testing.

2. Graphic test

In a Web application system, appropriate images and animations can serve both as advertising and to beautify the page. A Web application's graphics include pictures, animations, borders, colours, fonts, backgrounds, buttons, etc. The graphics test should include:

(1) Make sure that the graphics have a clear purpose and that images or animations are not piled up haphazardly so as not to waste transfer time. web application graphics should be as small as possible and should clearly illustrate something, usually linking to a specific page.

(2) Verify that the style of fonts is consistent across all pages.

(3) The background colour should match the font colour and foreground colour.

(4) The size and quality of the image is also a very important factor, usually using JPG or GIF compression.

3. Content testing

Content testing is used to check the correctness, accuracy and relevance of the information provided by the web application. The correctness of information refers to whether the information is reliable or misrepresented. For example, incorrect prices in a product price list can cause financial problems or even lead to legal disputes; the accuracy of information refers to whether there are grammatical or spelling errors. This test is usually carried out using word processing software; the relevance of the information refers to whether a list or portal of information currently being viewed can be found on the current page, which is generally known as a "list of related articles" on a Web site.

4. Interface test

The overall interface refers to the entire Web application system page structure design, which is to give the user a sense of the whole. For example, when users browse the Web application system, do they feel comfortable and intuitively know where the information they are looking for is located? Is the design style of the entire web application consistent? The process of testing the overall interface is in fact a survey to the end user. Generally web applications take the form of a questionnaire on the homepage to get feedback from end users. For all usability testing, the involvement of external parties (those with no or little contact with the web application development) is required, preferably the end users.

Client-side compatibility testing

1. Operating System Testing

There are many different types of operating systems on the market, the most common being Windows, Unix, Macintosh, Linux, etc. Exactly which operating system is used by the end user of the web application depends on the configuration of the user's system. In this way, compatibility issues can occur and the same application may work fine under some operating systems, but may fail under another. Therefore, before a Web system is released, it needs to be tested for compatibility under various operating systems.

2. Cross-browser testing

Browsers are the core building block of a Web client. Browsers from different vendors have different support for Java, JavaScript, ActiveX, plug-ins or different HTML specifications. For example, ActiveX is a product of Microsoft and is designed for Internet Explorer, JavaScript is a product of Netscape, Java is a product of Sun and so on. Also, frames and hierarchy styles are displayed differently in different browsers, or not at all. Different browsers also have different settings for security and Java. One way to test browser compatibility is to create a compatibility matrix. In this matrix, different manufacturers and versions of browsers are tested for their adaptability to certain building blocks and settings.

web application testing methodology

Security testing

The main areas of security testing for Web application systems are:

1. Web application systems nowadays basically use the registration first and login later. Therefore, valid and invalid usernames and passwords must be tested, noting whether they are case-sensitive, the limit of how many times they can be tried, whether they can browse a page directly without logging in, etc.

2. Whether the Web application system has a timeout limit, that is, whether the user needs to log in again after logging in for a certain period of time (e.g. 15 minutes) without clicking on any page, etc.