If you seem at classic world wide web server load tests tools, these as Load Runner or Jmeter, you will discover a primary design sample for recreating substantial volumes of world-wide-web targeted visitors. With these instruments a multi threaded application opens TCP sockets and destinations (by way of API calls) HTTP requests right on those sockets. In this way the expected volume of HTTP website traffic can be simulated with no the overhead of managing web browsers. Ordinarily all over 500 so-identified as 'digital people' can be simulated from a one Pentium 4 Computer with all around 1GB of RAM. If 'real browsers' had been to be executed in parallel on the exact gear only around 6 browsers could be simulated. For these reasons the method of recreating HTTP targeted traffic in multi-threaded procedures, calling APIs, has remained well-known for the last 15 several years or so.
Though the HTTP pushed solution remains common today there has emerged an additional feasible choice solution to simulating massive volumes of net targeted visitors, and this technique entails working several numerous 'headless' browsers in parallel to recreate the required world-wide-web browser targeted traffic for load tests the net server.
The time period 'headless' browser refers to a completely functional net browser, in terms of the needed APIs to connect with the web server, but without having the consumer interface (GUI) portion. There are a range of headless browsers freely available (eg HTMLUNIT and PhantomJS) and these can all be programmatically pushed to interact with the internet server in the exact same way a true browser would. While these browsers do not have a GUI they are extremely useful for sending requests to a Website Server in purchase to parse out the benefits for monitor seize, community monitoring or common web site automation.
Selenium WebDriver is an automated 'practical' testing device that can simulate consumer actions on a web browser these types of as Firefox or Net Explorer. Selenium can also simulate steps against HTMLUNIT. Supplied the useful resource footprint (CPU and Memory) of HTMLUNIT is significantly significantly less than a traditional browser multiple circumstances (executed as threads) of Selenium pushed HTMLUNIT browsers can be executed on a solitary computer to travel net website traffic for load screening a world wide web server. Usually close to 25 headless browsers can be driven from a Pentium 4 Laptop with 1GB ram. In this way about 500 'virtual consumers' can be simulated with 25 Pc's (or virtual machines) generating this procedure of driving web server traffic feasible for many load testing projects.
In get to operate several occasions of Selenium WebDriver working with the headless approach a multi threaded Java framework is required. For this reason both Jmeter or The Grinder open up source load screening frameworks will suffice.
Although not suited for simulating really massive volumes of web site visitors the headless browser method need to have regarded when it would normally be tricky to recreate the expected targeted traffic utilizing HTTP drivers. Scenarios wherever the headless browser load driving technique is useful includes net web pages that use url re-writing for session handling or in which accurate website traffic simulation is required. The headless browser tactic will recreate web visitors that is closer to actual browser website traffic, than that generated by the classic HTTP driver frameworks.