Web-based system testing In the development of Web-based systems, if there is a lack of strict processes, we may encounter some serious problems in the process of developing, publishing, implementing and maintaining the Web, and the possibility of failure is high. Moreover, as Web-based systems become more and more complex, the failure of one project can cause many problems. When this happens, our confidence in the Web and the Internet may be irrevocably shaken, causing a Web crisis. Moreover, the Web crisis may be more serious and widespread than the software crisis faced by software developers.
In the Web engineering process, the testing, confirmation and acceptance of Web-based systems is an important and challenging task. Web-based system testing is different from traditional software testing. It not only needs to check and verify whether it runs according to the design requirements, but also tests whether the display of the system on different users' browsers is appropriate. It is important to also conduct security and usability testing from the end-user perspective. However, the unpredictability of the Internet and Web media makes testing Web-based systems difficult. Therefore, we must research new methods and techniques for testing and evaluating complex web-based systems. The release cycle of general software is calculated in months or years, while the release cycle of web applications is calculated in days or even hours.
Web testers must deal with shorter release cycles, and testers and test managers are faced with the transition from testing traditional C/S structures and framework environments to testing rapidly changing Web application systems.
1. Functional testing
1. Link testing Links are a major feature of Web application systems. They are the main means of switching between pages and guiding users to pages with unknown addresses. Link testing can be divided into three aspects. First, test whether all links actually link to the linked page as indicated; secondly, test whether the linked page exists; finally, ensure that there are no orphan pages on the web application system. The so-called orphan page means that there are no links pointing to the page. , which can only be accessed if you know the correct URL address. Link testing can be automated and there are many tools available for this. Link testing must be completed during the integration testing phase, that is, link testing is performed after all pages of the entire Web application system are developed.
2. Form testing When users submit information to the web application system administrator, they need to use form operations, such as user registration, login, information submission, etc. In this case, we must test the integrity of the submission operation to verify the correctness of the information submitted to the server. For example: whether the date of birth and occupation filled in by the user are appropriate, whether the province and city filled in match, etc. If default values are used, verify the correctness of the default values. If the form can only accept certain values specified, test that as well. For example: only certain characters can be accepted. You can skip these characters during testing to see if the system will report an error.
3. Cookie testing Cookies are usually used to store user information and user operations in an application system. When a user uses Cookies to access an application system, the Web server will send information about the user and store the information in the form of Cookies. On the client computer, this can be used to create dynamic and custom pages or store information such as logins. If the web application system uses Cookies, you must check whether the Cookies can work properly. The content of the test can include whether cookies work, whether they are saved according to the scheduled time, what impact refreshing has on cookies, etc.
4. Design Language Testing Differences in web design language versions 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 HTML version issues, different scripting languages such as Java, JavaScript, ActiveX, VBScript or Perl also need to be verified.
5. Database testing In Web application technology, the database plays an important role. The database provides space for the management, operation, query and realization of user requests for data storage of the Web application system. In web applications, the most commonly used database type is a relational database, which can use SQL to process information. In a Web application system that uses a database, generally two types of errors may occur, namely data consistency errors and output errors. Data consistency errors are mainly caused by incorrect form information submitted by users, while output errors are mainly caused by network speed or program design issues. For these two situations, tests can be conducted separately.
2. Performance test
1. Connection speed test
The speed at which users connect to the Web application system changes according to the way they access the Internet. They may dial up by phone or use broadband Internet access. Users can wait for a longer period of time when downloading a program, but not when simply visiting a page. If the web system response time is too long (for example, more than 5 seconds), users will leave because they are impatient to wait. In addition, some pages have timeout restrictions. If the response speed is too slow, users may need to log in again before they have time to browse the content. Moreover, if the connection speed is too slow, it may also cause data loss and prevent users from getting the real page.
2. Load testing
Load testing is to measure the performance of the Web system at a certain load level to ensure that the Web system can work normally within the requirements. The load level can be the number of users accessing the Web system at the same time at a certain time, or the amount of online data processing. For example: How many users can the Web application system allow to be online at the same time? If this number is exceeded, what will happen? Can the Web application system handle a large number of user requests for the same page?
3. Stress testing
Load testing should be arranged in the Web system After release, test it in the actual network environment. Because an enterprise's internal employees, especially project team members, are always limited, and the number of requests that a Web system can handle at the same time will far exceed this limit, so the results will only be correct if they are put on the Internet and accepted load testing. Believable. Conducting stress testing refers to actually destroying a web application system and testing the system's response. Stress testing is to test the system's limitations and fault recovery capabilities, that is, to test whether the web application system will crash and under what circumstances it will crash. Hackers often serve false data payloads until the web application system crashes, and then gain access when the system is restarted. Areas of stress testing include forms, login and other information transfer pages.
3. Usability testing
1. Navigation test Navigation describes the way users operate within a page, between different user interface controls, such as buttons, dialog boxes, lists and windows, etc.; or between different connection pages. You can determine whether a Web application is easy to navigate by considering the following questions: Is navigation intuitive? Are major parts of the Web system accessible from the home page? Does the Web system require a site map, a search engine, or other navigation aids? On a page Putting too much information often has the opposite effect than intended. Users of web application systems tend to be purpose-driven and quickly scan a web application system to see if there is information that meets their needs. If not, they will leave quickly. Few users are willing to take the time to become familiar with the structure of a Web application system. Therefore, Web application system navigation help should be as accurate as possible. Another important aspect of navigation is whether the page structure, navigation, menus, and connection styles of the Web application system are consistent. Ensure that users intuitively know whether there is content in the web application system and where the content is. Once the level of the Web application system is decided, it is necessary to start testing the user navigation function. Let the end users participate in this test, and the effect will be more obvious.
2. Graphics test
In Web application systems, appropriate pictures and animations can not only play the role of advertising, but also beautify the page. The graphics of a Web application system can include pictures, animations, borders, colors, fonts, backgrounds, buttons, etc.
The contents of the graphics test include:
(1) Ensure that graphics have a clear purpose, and do not pile pictures or animations together randomly to avoid wasting transmission time. The image size of the web application system should be as small as possible, and it should be able to clearly explain something, usually linking to a specific page.
(2) Verify whether the font style of all pages is consistent.
(3) The background color should match the font color and foreground color.
(4) The size and quality of the picture is also a very important factor, and JPG or GIF compression is generally used.
3. Content testing
Content testing is used to test the correctness, accuracy and relevance of the information provided by the Web application system. Information accuracy refers to whether the information is reliable or misinformed. For example, in a product price list, incorrect prices may cause financial problems or even lead to legal disputes; the accuracy of the information refers to whether there are grammatical or spelling errors. This kind of test is usually carried out using some word processing software, such as using the "Pinyin and Grammar Check" function of Microsoft Word; the relevance of information refers to whether an information list or entry related to the current browsing information can be found on the current page, that is, The so-called "related article list" in general Web sites.
4. Overall interface test
The overall interface refers to the page structure design of the entire Web application system, which gives users a sense of integrity. For example: Do users feel comfortable when browsing the Web application system? Do they intuitively know where the information they are looking for is? Is the design style of the entire Web application system consistent? The testing process of the overall interface is actually a test for the end user. The process of investigation. Generally, Web application systems take the form of a questionnaire on the homepage to obtain feedback from end users. For all usability testing, there is a need for the participation of external people (people who have no or little contact with Web application system development), preferably end users.
4. Client compatibility test
1. Platform test
There are many different operating system types on the market, the most common ones are Windows, Unix, Macintosh, Linux, etc. Which operating system the end user of the web application system uses depends on the configuration of the user system. In this way, compatibility issues may occur. The same application may run normally under some operating systems, but may fail to run under other operating systems. Therefore, before the Web system is released, the Web system needs to be tested for compatibility under various operating systems.
2. Browser test
The browser is the core component of the Web client. Browsers from different manufacturers 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. Additionally, frame and hierarchy styles appear differently in different browsers, or not at all. Different browsers have different security and Java settings. One way to test browser compatibility is to create a compatibility matrix. In this matrix, the adaptability of browsers from different manufacturers and different versions to certain components and settings is tested.
5. Security testing
The security testing areas of Web application systems mainly include:
(1) Today's Web application systems basically adopt the method of registering first and then logging in. Therefore, it is necessary to test valid and invalid usernames and passwords, pay attention to whether they are case-sensitive, limit the number of attempts, whether you can browse a page directly without logging in, etc.
(2) Whether the Web application system has timeout restrictions, that is, if the user does not click on any page within a certain period of time (for example, 15 minutes) after logging in, does he need to log in again to use it normally.
(3) In order to ensure the security of the Web application system, log files are crucial. It is necessary to test whether the relevant information is written into the log file and whether it can be traced.
(4) When using a secure socket, test whether the encryption is correct and check the integrity of the information.
(5) Server-side scripts often constitute security loopholes, and these loopholes are often exploited by hackers. Therefore, we also need to test the problem that scripts cannot be placed and edited on the server side without authorization.
6. Summary
This article discusses Web-based system testing methods from the aspects of function, performance, usability, client compatibility, security, etc. Web-based system testing has similarities and differences with traditional software testing, which poses new challenges to software testing. Web-based system testing not only needs to check and verify whether it operates according to the design requirements, but also evaluates whether the display of the system on different users' browsers is appropriate. It is important to also conduct security and usability testing from the end-user perspective.