If your site – it is not simply a static Web page, a tool that should provide interactive services to visitors, then you need to think about its testing before placing on the server. And the more sophisticated web-based system you create, the more it needs testing. For now web sites are already full applications – e-shop, forum, mailing services and much more – all of these interactive services in some way interact with users from other servers (and often simultaneously). They bring with conventional applications, which we call the desktop. In some cases, the difference between them only in the place of the code. If the Web site is part of your business, pre-testing is to show you how the site will handle the load, as will be the interaction with users and so on. So at this point and we dwell in more detail.
So, we have a website (server), which provides a service to users. What kind of testing are available for websites, and which tests are necessary or desirable to carry out to make sure that he will not fail at a critical moment, and users will be satisfied?
The first test that can be called virtually all major online services that interact with the user – this is a test for usability, or ease of use. Such a test – one of the most expensive, because the most valuable information can be obtained only from actual users, watching them work with your site. Such studies require expensive infrastructure and time-consuming, difficult to automate. On testing and usability itself has already been written on the pages hostinfo.ru – a review article "Usability" – a new useful word in web development "and the article on this research and evaluation -" Evaluating the usability. "
Usability testing overlaps with testing the quality of performance and convenience of the site interface. Testing techniques here are similar to conventional testing of desktop applications. This is a special test account macro-scenario that mimics the actions of real users – "go on the first page – enter the username and password – click on the button – go to the link and so on." Then programmatically creates multiple virtual users (thousands and more serious in testing) that are "go" to the site by checking out his work. This was all followed the manager (the common man), building on the basis of the data report of the study site.
These test systems can be quite large even in the literal sense – the volume of distribution of hundreds of megabytes. As an example – a comprehensive solution for testing Web applications, Empirix – e-TEST suite. This tool can be used to test complex web applications built using Microsoft. NET, J2EE, Web services, as well as standalone applications and Web sites. The complex includes a solution for extensive testing – testing of the interface to the load-carrying capacity, safety, and even carrying out tests of remote sites in real terms – through firewalls, proxy servers and the like. To test the interface of the e-TEST suite includes a component called e-Tester – in the original it is called Automated Regression and Functional Testing Tool for Web Applications (Record / Playback). This component is precisely designed to record a sequence of actions and play them later, mimicking the activity of users. The other component – e-Monitor – Real-time testing collects statistics and information about errors that occurred, and allows you to schedule tests (eg, if you are testing a remote site running, it can be tested at different times).
Another type of testing – checking references. In a large test suite is integrated into the usability test or a validation of HTML-code, but there are a number of utilities for simple ones such tests. Such testing is important for internal links (in the case of large branched and portals), and external – if, for example, a catalog of sites or regular page "Links". Perhaps such a test – this is one of the few tests that are specific to Web applications and sites. In addition, it can and should be periodically carried out on site working – in fact over time the structure is changing, and some links may become invalid.
Of special note is the test for safety. This is a very important type of tests, because of the server’s security depends almost everything – and the business itself, and user confidence, and safety information. However, unlike other tests, safety testing should be performed regularly. In addition, the test subject not only to the site or web application, and the entire server completely – and a Web server and operating system and all network services. As in the case of other tests, the program is "pretending to be a" real user-cracker and tries to apply to the server all known methods of attack, and verifies all vulnerability. Result will be a report about the found vulnerabilities and recommendations to address them. Typically, these security scanners are sold as a standalone product – for example, one of the best scanners XSpider, which we wrote in the article "Knock, knock, to check you …».
The next type of testing is to test for resistance to high loads – Load-testing, stress-test or performance test. This test simulates simultaneous operation of hundreds or thousands of visitors (all of which can "walk" through the site in accordance with its script), checking whether a stable job site under heavy load. In addition, you can simulate the short-term peak loads, when the number of visitors grows leaps and bounds – it is very important for news sites and other resources with non-uniform audience. In this test tests not only and not the site itself, as a joint teamwork of the whole complex – the hardware of the server, web server software core (engine) and other components of the site. For such solutions can be attributed, and described the utility WAPT («Test Site"), as well as a number of other – Microsoft Web Application Stress Tool (WAS), SilkPerformer, Webserver Stress Tool, and others.
Another type of testing is to test the fidelity HTML-code of your pages. For this kind of test is written a lot of tools – from simple Perl scripts to powerful validators that check the entire site for compliance with (and some validators can automatically correct the flaws found – for example, missing closing tags and so on). Often, these tools build in web editors, but there are web browsers with built-in validators. An example of such a tool is utility Tidy – originally a console program, it has several different graphical interfaces can automatically highlight the code wrong and fix some bugs. It can also be used in the development – TidyLib includes all the necessary functionality and can connect to programs written in Java, Pascal,. NET, C + +, Perl, PHP.
Here we outline and looked at some kind of testing web sites. Some of them are very easily carried out automatically and free programs, others require careful organization and analysis of results, involving independent testers and evaluators, sophisticated equipment. Some programs are very simple – just a few dozen lines of Perl or a couple of kilobytes of executable file – some are a whole software package designed to work with dozens of testers, engineers and analysts. But they all serve one purpose – to help you make a quality, convenient, secure and stable web site.