Choosing a Browser Engine

Browser Engines

Badboy supports different "engines" for running Background Threads, which correspond roughly to different kinds of browsers to use for executing your tests. Each engine has different characteristics and capabilities. After you create a Thread Item, one of the most important decisions to make is which Browser Engine to use for your load test. Which one you choose would depend on the nature of your web site, how you have recorded your script and kind of test you want to conduct.

The three kinds of thread engine are:

  • Raw - Raw threads are very simple. They do not attempt to render the pages downloaded by the browser at all. All they do is download the data and let you do Assertions to check that the page content returned contains expected text. Due to Raw Threads being so simple Badboy can execute them very efficiently and can hence can generate a very large load on your web server from only a single instance of Badboy. The biggest disadvantage of Raw Threads is that because they do not parse or render the HTML they cannot perform any operations that involve the user interface of the browser. For example, and they cannot execute Javascript, and most kinds of Navigations cannot be executed because they are performed by acting on the browser user interface.

    Because of these limitations normally the best way to create scripts for Raw Threads to execute is to only record your browsing actions using Request Mode as this mode does not rely on the browser user interface and thus is well supported by Raw Threads.

  • External MSHTML - MSHTML is the browser component that Microsoft ™ includes with Microsoft Windows ™ and Internet Explorer ™ . When you use the MSHTML Engine Badboy creates insvisible instances of MSHTML that it uses to navigate your web site. Although you can't see them they are actually downloading, parsing and rendering the HTML as if a real browser was doing it. The biggest advantage of this is that if your web site contains Javascript, or if you want to control the virtual Badboy instances using Javascript (eg. to manipulate variables or to perform JScript Checks to validate your web site) then MSHTML Threads can do that. When you use External MSHTML, Badboy in fact runs each virtual browser in it's own process. This ensures that the virtual browsers will not interact, for example, by sharing session cookies.

    External MSHTML threads are actually run using the Badboy command line runner, bbcmd. When they run they load the script from the saved file, not from the script that you may be editing. This means that it is very important to ensure your script is saved before launching the thread item as otherwise it may play different items to the ones you expect!

  • MSHTML - MSHTML is the same as External MSHTML except that the virtual browser windows are run inside Badboy itself. The main advantages to this are that performance is better and the tests are less resource intensive on your computer - just as it is less expensive in memory to run one copy of a browser with several windows instead of several copies of the whole browser, so it is less expensive to run virtual windows in a shared Badboy instance than it is to launch many separate copies of Badboy. However a big disadvantage of using internal MSHTML windows is that they can interact with each other. For example, all threads created internally share cookies with each other, and even with the main (visible) Badboy window. Thus all such threads may appear to be logged in as the same user in some applications.

Other Topics Related to Thread Items

Badboy Documentation Generated on Mon Dec 29 22:28:41 EST 2008