📜 ⬆️ ⬇️

Testing web applications - Sloppy internet channel emulator.

Today we will talk about a very simple utility, but nevertheless that can become your constant and reliable friend and helper.

Of all the types of testing web applications, the most popular, in my opinion, is testing the system for users with different access channels. Well, maybe, apart from the compatibility test in different browsers. And so, in almost every project we need or it is very desirable to see how people with different connection speeds will see our project. This is especially true of web applications - sometimes the performance of a project generally depends on it, in particular, when large AJAX libraries are loaded and the project often interacts with the server. That's just for such cases there is a project Sloppy .

Architecturally, Sloppy is a proxy server that emulates access to a specified site through a channel with a specified bandwidth - from a modem 9.6 Kb, to a dedicated line of 512 Kb. The question is why only such a small upper threshold of speed, because the channels of 1 MB and more are already quite widespread. Most likely it means that if the speed is 1 MB or more, then any project will load so quickly that it does not make sense to test, although I am inclined to argue in this case - there are projects that even cause such a channel if not just delays, then The slow loading process is not so much connected with the channel as with the rest of the costs, so I would still like to test it on such clients.

From the available settings we have: the address of the site that we will test, the choice of speed (from the 9.6, 14.4, 28.8, 56, 128, 256 and 512 Kb grids), as well as the port through which we will receive the page. By the way, due to its “proxy nature”, it can be used both for testing a local project and for any project on the network. Of course, in this case, you need access to the Internet, whereas it is simply not necessary for a local server test (well, except perhaps for downloading the package).
')
After setting the parameters and starting, the browser opens the local address 127.0.0.1 on the port that you specified in the options (by default, 7569) and opens the site you specified.



By the way, Sloppy itself is interesting because it is distributed as a JNLP file, that is, it uses Java Web Start for launching, while the code itself is downloaded from the project site, however, it is absolutely miniature in size. You can download the source code itself.

Naturally, in more powerful and specialized packages for testing, you can control all aspects of emulation and interconnection much more flexibly and completely, but how often do you need a couple of dozen parameters for a simple check? But after running a project a couple of times through Sloppy, you will immediately understand where and what you can fix, and then proceed to complete testing using professional tools.

In terms of development, it seems interesting to integrate or simply to work together with utilities for monitoring the loading of scripts and other elements of the page and analyzing this process. For example, you can test your applications perfectly using the Sloppy + Firebug + YSlow bundle! This is a set for serious use. What do you think?

Source: https://habr.com/ru/post/24931/


All Articles