Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Tools

Load Testing Web Sites


Mar01: Programmer's Toolchest

A crucial part of web design is simulating and testing the anticipated load

Nick is DDJ's senior editor. He can be reached at [email protected].


While many factors contribute to a successful web site design, acceptable performance under load is key. Without some kind of measurement tool, however, acceptable performance is difficult to quantify. This is particularly true of complex web sites simultaneously running many different applications — processing HTTP requests, running Java Servlets or CGI scripts, accessing databases, and so on. Load-testing software lets you simulate scenarios in which many users are logged on to the site simultaneously and exercising its various functions such as making transactions, navigating the site, and using the search engine. These tools make it possible for you to isolate performance bottlenecks on the site.

Working together with National Software Testing Laboratories (NSTL; http://www.nstl.com/) (a subsidiary of CMP Media, the parent company of DDJ), we took a look at three load-testing tools:

  • Mercury Interactive's Loadrunner.

  • RSW Software's E-load.

  • Segue Software's Silkperformer.

In addition to all being load-testing tools, one thing these packages have in common is that they are expensive. They are priced according to the number of virtual users you are licensed to simulate. At the high end, Loadrunner from Mercury Interactive (http://www.merc-int.com/) starts at $40,000 for 50 concurrent users. At the lower end are E-load from RSW Software (http://www.empirix.com/) at $19,995 for 100 users (plus $4995.00 for the required E-test module), and Silkperformer from Segue Software (http://www.segue.com/), which starts at $25,000 for 100 users.

These packages require Windows NT/2000 on the server side and include agents that can run on remote clients. While you can create all of your virtual users directly on the server, keep in mind that the server is also running the agent software that normally would run on a remote client. At some point (somewhere past 100 users), you run the risk of bogging down the server (this number, of course, depends on the horsepower and memory capacity of your test server). Loadrunner and E-load support UNIX-based as well as Windows-based clients while Silkperformer currently only supports Windows NT.

Load-testing tools have varying degrees of features and advanced capabilities, particularly in the area of programmability and customization. However, they all have the ability to simulate a number of virtual users — up to the maximum number of licensed users — which can vary from as few as 25 up to an unlimited number (the unlimited user option with Loadrunner will cost you a mere $150,000). They also have the ability to simulate typical user sessions on the web site. Where the packages differ is in the degree of complexity and the number of supported protocols. While they all support basic protocols (such as HTTP- and ODBC-based databases), you will want to check carefully whether the protocol is supported in the base package or available as an option if you're working with protocols such as, say, Tuxedo.

Loadrunner, E-load, and Silkperformer have a number of other capabilities in common. They all can assign different static IP addresses to the virtual users, letting you test firewalls and security features. Also, they can all emulate various transmission modes such as modem, ISDN, DSL, and T1.

NSTL used a basic test procedure to take these packages through their paces. Example 1 shows the mouseclicks of a simple session on http://www.cnn.com/. Example 2 is another set of scripts simulating electronic shopping. The tested packages allow the use of text- or comma-delimited files for data pooling of items such as User ID, password, quantity, e-mail address, and so forth. The testbed consisted of four 450-MHz Compaq Deskpro EP/SB Series machines, each with 384 MB of RAM.

Mercury's Loadrunner 6.5

Loadrunner includes a tool called a "Virtual User Generator" for recording and editing scripts that store the user's mouseclicks and keystrokes. Loadrunner scripts are generated in a C-like language called "Test Script Language" (TSL). Experienced C programmers can therefore easily customize scripts to perform additional functions. A comprehensive help system offers plenty of sample scripts. Listing One is code generated by performing the actions in Example 1. However, you can also run tests in Loadrunner without programming. You can use its GUI to insert actions into the script, such as transaction timers, rendezvous points (where more virtual users join the session), additional scenarios, and so forth.

Loadrunner employs the concept of groups, letting you create groups of virtual users, who can be added to or subtracted from the test scenario. Each of these groups can be performing different actions. For example, one group could be exercising the web site's search functions while another could be purchasing products. Another group could be accessing the web site's inventory database. While the test is in progress, you can increase or decrease the number of groups. You can also view the logs of each group or of individual virtual users while the test is in progress.

Loadrunner's capabilities go well beyond simple performance measurements. The system includes a network monitoring feature for checking the performance of a particular network path to determine which network segment is causing delays. It also includes a database server resource monitor that provides performance statistics for Oracle or SQL Server databases.

Loadrunner provides an array of reports, the results of which can be exported to virtually any desired data format. Reports include data on both the activity of the session (number of total transactions, number of failed transactions, number of failed users, hits per second, and so on) and the performance of the session (transactions per second, time histories of performance versus number of users, and the like). These examples represent just a small sample of the information accessible in Loadrunner reports. Figure 1 is a typical performance report, generated from the session in Example 1.

Segue Silkperformer

Silkperformer also records scripts and converts them to a programming language called the "Benchmark Database Language" (BDL), which is based on Pascal. Listing Two is a sample based on the session in Example 1. The documentation includes a BDL reference book and sample scripts for those who want to customize the test sessions.

Silkperformer is not as flexible as Loadrunner in that the number of virtual users cannot be increased in the middle of a test session. However, you can eliminate users during a session and thus decrease the load. Various users can run different scripts using agents, which are similar to the groups used in Loadrunner. Silkperformer includes a variety of wizards for inserting functions and parameters into scripts if you aren't proficient in the BDL language.

Silkperformer includes nine basic report templates that provide data on throughput, transactions, response time, and so on. The reporting function is not as flexible as Loadrunner's because results can only be saved in HTML or exported to comma-delimited format; see Figure 2 for a sample report.

RSW E-load

E-load requires a separate module called "E-test" for generating scripts. Generally, RSW sells E-load as part of its E-suite set of testing tools, which also includes "E-monitor." E-tester records virtual user actions during a session and places them in a window. A graphical editing tool is provided for modifying the script. You can also insert Visual Basic, C++, or Java routines into the script as external calls from the script. Figure 3(a) is a sample script with an external call; Figure 3(b) is a typical VB script.

E-load has an online reporting tool called "Web Reporter," which requires Internet Explorer and Excel 2000. Reports provide basic data on performance versus time and number of users, as well as errors versus time and number of users. Figure 4 is a sample report.

Like Loadrunner, E-load can remove and add virtual users during a test session. It is also possible to start new scripts in the middle of a test. E-load is the most automated and graphical of the three packages. Its programming capabilities are more limited since it only supports external calls. But many users will find its capabilities adequate for their needs at a considerably lower price than Loadrunner.

Conclusion

The biggest worry for web developers is the scalability of their applications. What may run without a hitch with a dozen clients can slow to a crawl when confronted with hundreds of simultaneous users. Load-testing tools are expensive and require a major commitment in time and effort to understand how to apply them and obtain accurate results. But if you are involved in a serious web-design project with commercial implications, load-testing tools are a worthwhile investment.

While this article makes no claim to recommend one package or another, the testers at NSTL found that Loadrunner was the most capable and comprehensive of the three packages tested — but almost twice the price of the other two. RSW's E-load was easy to use, had excellent reporting capabilities, and had a good user interface. Silkperformer was also a capable package, having a built-in programming language, but more limited scenario testing capability. This article hopefully provides a starting point for a thorough investigation, particularly if you are actually considering purchasing a load-testing package.

Acknowledgment

Thanks to Rajesh Patel, test engineer at NSTL, for his assistance in preparing this article. He can be reached at [email protected].

DDJ

Listing One

Below is the actual recorded script from www.cnn.com using LoadRunner
#include "as_web.h"
CNN()
{
    web_add_cookie("CNNid=Gcf1947e6-2991-974131075-3; DOMAIN=www.cnn.com");
    web_add_cookie("EditionPopUp=seen(sh:1&id:0); DOMAIN=www.cnn.com");
    web_add_cookie("CNNinPoll=1304821; DOMAIN=www.cnn.com");
    web_url("www.cnn.com",
        "URL=http://www.cnn.com/",
        "Resource=0",
        "RecContentType=text/html",
        "Snapshot=t1.inf",
        LAST);
    web_link("WORLD",
        "Text=WORLD",
        "Ordinal=1",
        "Snapshot=t2.inf",
        LAST);
    lr_think_time( 3 );
    web_link("U.S.",
        "Text=U.S.",
        "Ordinal=1",
        "Snapshot=t3.inf",
        LAST);
    web_add_cookie("CNNid=Gcf1947e6-2991-974131075-3; 
                                     DOMAIN=sportsillustrated.cnn.com");
    web_add_cookie("EditionPopUp=seen(sh:1&id:0); 
                                     DOMAIN=sportsillustrated.cnn.com");
    web_add_cookie("CNNinPoll=1304821; DOMAIN=sportsillustrated.cnn.com");
    lr_think_time( 11 );
    web_link("(MORE)",
        "Text=(MORE)",
        "Ordinal=2",
        "Snapshot=t4.inf",
        LAST);
    lr_think_time( 3 );
    web_url("www.cnn.com",
        "URL=http://www.cnn.com/",
        "Resource=0",
        "RecContentType=text/html",
        "Snapshot=t5.inf",
        LAST);
    web_link("SPACE",
        "Text=SPACE",
        "Ordinal=1",
        "Snapshot=t6.inf",
       LAST);
    lr_think_time( 9 );
    web_link("HEALTH",
        "Text=HEALTH",
        "Ordinal=1",
        "Snapshot=t7.inf",
        LAST);
    web_link("ENTERTAINMENT",
        "Text=ENTERTAINMENT",
        "Ordinal=1",
        "Snapshot=t8.inf",
        LAST);
    web_link("POLITICS",
        "Text=POLITICS",
        "Ordinal=1",
        "Snapshot=t9.inf",
        LAST);
    web_link("LAW",
        "Text=LAW",
        "Ordinal=1",
        "Snapshot=t10.inf",
        LAST);
    web_url("calendar.html",
        "URL=http://www.cnn.com/LAW/trials.and.
                          cases/court.docket/2000/11/calendar.html",
        "TargetFrame=",
        "Resource=0",
        "RecContentType=text/html",
        "Snapshot=t11.inf",
        LAST);
    web_url("20.html",
        "URL=http://www.cnn.com/LAW/trials.and.
                         cases/court.docket/2000/11/20.html",
        "TargetFrame=",
        "Resource=0",
        "RecContentType=text/html",
        "Snapshot=t12.inf",
        LAST);
    lr_think_time( 8 );
    web_url("CAREER",
        "URL=http://www.cnn.com/CAREER/",
        "TargetFrame=",
        "Resource=0",
        "RecContentType=text/html",
        "Snapshot=t13.inf",
        LAST);
    web_link("TRAVEL",
       "Text=TRAVEL",
        "Ordinal=1",
        "Snapshot=t14.inf",
        LAST);
    web_link("FOOD",
        "Text=FOOD",
        "Ordinal=1",
        "Snapshot=t15.inf",
        LAST);
    web_link("ARTS & STYLE",
        "Text=ARTS & STYLE",
        "Ordinal=1",
        "Snapshot=t16.inf",
        LAST);
    web_link("BOOKS",
        "Text=BOOKS",
        "Snapshot=t17.inf",
        LAST);
    web_link("NATURE",
        "Text=NATURE",
        "Snapshot=t18.inf",
        LAST);
    web_link("LOCAL",
        "Text=LOCAL",
        "Snapshot=t19.inf",
        LAST);
    web_link("WEATHER",
        "Text=WEATHER",
        "Ordinal=2",
        "Snapshot=t20.inf",
        LAST);
    web_submit_form("redirect",
        "Ordinal=5",
        "Snapshot=t21.inf",
        ITEMDATA,
        "name=zip",
        "value=19116",
        ENDITEM,
        LAST);
    return 0;
}

Back to Article

Listing Two

//----------------------------------------------------------------------
// Recorded 11/13/2000 by SilkPerformer Recorder v4.0.0.803
//----------------------------------------------------------------------
benchmark SilkPerformerRecorder
use "WebAPI.bdh"
dcluser
  user
    VUser
  transactions
    TInit           : begin;
    TMain           : 1;
var
dclrand
dcltrans
  transaction TInit
  begin
    //WebSetBrowser(WEB_BROWSER_MSIE55);
    //WebSetUserBehavior(WEB_USERBEHAVIOR_FIRST_TIME);
    //WebSetDocumentCache(true, WEB_CACHE_CHECK_SESSION);
  end TInit;
  transaction TMain
  var
    hContext1 : number;
  begin 
    //WebCookieSet(
      //
      //"CNNid=cf301322-26889-974130557-1; expires=Wednesday, 
      //                        30-Dec-2037 16:00:00 GMT; path=/; d"
      //"omain=.cnn.com", "http://www.cnn.com/");
    WebPageAddUrl("http://a388.g.akamai.net/f/388/21/15m/www.cnn.com/
                                             virtual/2000/code/main.js")
      ;
    WebPageAddUrl(
      "http://a388.g.akamai.net/f/388/21/15m/www.cnn.com/
                                             virtual/2000/style/main.css");
    WebPageAddUrl(
      "http://a388.g.akamai.net/f/388/21/2d/www.cnn.com/ELECTION/2000/
                                             virtual/style/elect1.css")
      ;
    // Redirecting to http://www.cnn.com/images/icons/audio.gif
    WebCookieSet(
      "CNNid=cf301322-26889-974130557-1; path=/; 
                         domain=.com; expires=Sat, 13 Nov 2010 15:46:54"
      " GMT", "http://cnn.com/");
    // Redirecting to 
    // http://www.cnnaudience.com/
    //       cookie.crumb?cookie=cf301322-26889-974130557-1&origin=cnn&serv
    // er=www.cnn.com
    //WebCookieSet(
      //
      //"AUDid=cf1947e6-3020-974130577-10; expires=Wednesday, 
      //                           30-Dec-2037 16:00:00 GMT; path=/; d"
      //"omain=.cnnaudience.com", "http://www.cnnaudience.com/");
    // Redirecting to http://www.cnn.com/images/time/1101001120cnn.gif
    WebPageUrl("http://www.cnn.com/", "CNN.com");
    WebCookieSet(
      "UID=2|2855858083|20201111; path=/; domain=.bfast.com; 
                                   expires=Sat, 13 Nov 2010 15:46:57 "
      "GMT", "http://service.bfast.com/");
    WebCookieSet(
      "DRJ=1|2855858083|35334469|33331699|33893015|0|8635926; 
                                    path=/; domain=.bfast.com; expire"
      "s=Sat, 13 Nov 2010 15:46:57 GMT", "http://service.bfast.com/");
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/world.css");
    // Redirecting to 
    // http://www.cnnaudience.com/cookie.crumb?
    //              cookie=cf301322-26889-974130557-1&origin=cnn&serv
    // er=www.cnn.com
    //WebCookieSet(
      //
      //"AUDid=cf1947e6-2988-974130592-7; expires=Wednesday, 
      //                        30-Dec-2037 16:00:00 GMT; path=/; do"
      //"main=.cnnaudience.com", "http://www.cnnaudience.com/");
    WebPageLink("WORLD", "CNN.com - World News"); // link: 16

    ThinkTime(2.4);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/us.css");
    WebPageLink("U.S.", "CNN.com - US News"); // link: 45
 
    ThinkTime(8.1);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/weather.css");
    WebPageAddUrl("http://www.cnn.com/virtual/weather/vector.js");
    WebCookieSet(
      "id=80000003a08a389; path=/; domain=.doubleclick.net; 
                                   expires=Sat, 13 Nov 2010 15:47:40 G"
      "MT", "http://ad.doubleclick.net/");
    // Redirecting to http://m.doubleclick.net/viewad/393189-cubanner_05.gif
    WebPageLink("WEATHER", "CNN.com - Weather Main Page", 2); // link: 59
    WebPageStoreContext(hContext1);
    // Redirecting to http://sportsillustrated.cnn.com/

    ThinkTime(9.0);
    WebPageAddUrl(
      "http://a1208.g.akamai.net/7/1208/380/1d/sportsillustrated.cnn.com/
                                                    images/components/navo"
      "therbutton.gif");
    WebPageAddUrl("http://sportsillustrated.cnn.com/
                                  your_turn/you_said_it/front_quotes.js");
    // Redirecting to 
    // http://sportsillustrated.cnn.com/
    //                  images/ads/swimsuit/2000/0222/Final_120x60.gif
    // Redirecting to 
    // http://sportsillustrated.cnn.com/
    //                  images/ads/cnnsi/2000/0214/nav_magazine3.gif
    // Redirecting to 
    // http://sportsillustrated.cnn.com/
    //                  cookie.crumb?audid=Gcf1947e6-2988-974130592-7
    // Redirecting to 
    // http://sportsillustrated.cnn.com/
    //                  cookie.crumb?audid=Gcf1947e6-2988-974130592-7
    //WebCookieSet(
      //
      //"CNNid=Gcf1947e6-2988-974130592-7; domain=.cnn.com; path=/; 
      //                                expires=Fri 13-Aug-2010 02:12"
      //":00 GMT;", "http://sportsillustrated.cnn.com/");
    WebPageLink("(MORE)", "CNNSI.com from CNN and Sports Illustrated", 2); 
                                                               // link: 34
    ThinkTime(23.7);
    WebUrl(
      "http://a1204.g.akamai.net/f/1204/1181/24h/www.affiliate.net/
                                          affnet/images/book_topA.gif",
       0.13);
    WebUrl(
      "http://a1204.g.akamai.net/f/1204/1181/24h/www.affiliate.net/
                                          affnet/images/blue_go.gif", 
      0.16);
    // Redirecting to http://www.cnn.com/images/time/1101001120cnn.gif
    WebUrl("http://cnn.com/images/time/1101001120cnn.gif", 0.06);
    WebCookieSet(
      "CNNid=Gcf1947e6-2988-974130592-7; path=/; domain=.com; 
                                      expires=Sat, 13 Nov 2010 15:48:17"
      " GMT", "http://cnn.com/");
    WebUrl("http://www.cnn.com/cookie.crumb", 0.34);
    WebCookieSet(
      "CNNid=Gcf1947e6-2988-974130592-7; path=/; domain=.com; 
                                       expires=Sat, 13 Nov 2010 15:48:17"
      " GMT", "http://cnn.com/");

    ThinkTime(2.1);
    WebPageBack();
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/tech.css");
    WebPageAddUrl("http://ads.enliven.com/nc/rd", NC_RD001);
    // Redirecting to 
    // http://ads.enliven.com/tools/igen.dll?session=256410158;
    //                               euid=0;type=script;cid=102016;sid
    // =300;click=
    //WebCookieSet("euid=0;expires=Thursday, 01-Jan-2030 00:00:00 GMT;path=/", 
      //"http://ads.enliven.com/");
    // Redirecting to 
    // http://ads.enliven.com/tools/igen.dll?session=239663534;
    //                               euid=545449926;type=iframe;cid=10
    // 2016;sid=300;click=
    //WebCookieSet("euid=545449926;expires=Thursday, 
    //                         01-Jan-2030 00:00:00 GMT;path=/", 
    //                         "http://ads.enliven.com/");
    // Redirecting to http://ads.enliven.com/
    //                content/102000/16/creative/shopping_468x6012k3.gif
    WebPageLink("TECHNOLOGY", "CNN.com - Technology"); // link: 46

    ThinkTime(3.4);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/space.css");
    //WebCookieSet(
      //
      //"uid=0xd3c5d356d.0xcf08e9db; expires=Mon, 31-Dec-2029 23:59:59 GMT; 
      //                                       path=/; domain=ads.li"
      //"nk4ads.com", "http://van.ads.link4ads.com/");

    // Redirecting to 
    // http://ads.fp.sandpiper.net/was.ms.link4ads.com/
    //                            creatives/creatives1/22/35/79/0-37.gif
    WebPageAddUrl("http://www.cnn.com/TECH/virtual/space/1999/
                                                     countdown.alt.js");
    WebPageLink("SPACE", "CNN - Technology: Space"); // link: 64
 
    ThinkTime(9.3);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/health.css");
    WebCookieSet(
      "CNNid=Gcf1947e6-2988-974130592-7; path=/; domain=.com; 
                                         expires=Sat, 13 Nov 2010 15:48:46"
      " GMT", "http://cnn.com/");
    // Redirecting to http://m.doubleclick.net/
    //                             viewad/317166-0mbth068_pixel.gif
    // Redirecting to http://www.cnn.com/HEALTH/
    //                             condition.clinic/images/webmd.box.gif
    WebPageLink("HEALTH", "CNN.com - Health"); // link: 48

    ThinkTime(6.6);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/entertainment.css");
    WebPageLink("ENTERTAINMENT", "CNN.com - Entertainment Main Page"); 
                                                          // link: 58

    ThinkTime(9.5);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/allpolitics.css");
    // Redirecting to http://m.doubleclick.net/
    //                                  viewad/201365-now_refreshaiabaa.gif
    WebPageLink("POLITICS", "CNN/AllPolitics"); // link: 41

    ThinkTime(7.6);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/law.css");
    WebPageAddUrl("http://www.cnn.com/virtual/2000/law/code/law.js");
    WebPageAddUrl("http://www.cnn.com/LAW/images/top_nav/tcOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/top_nav/ofOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/top_nav/llOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/janOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/febOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/marOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/marOff.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/aprOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/mayOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/junOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/julOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/augOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/sepOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/octOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/novOn.gif");
    WebPageAddUrl("http://www.cnn.com/LAW/images/
                                court.docket/months.main/decOn.gif");
    WebPageLink("LAW", "CNN.com - LAW Center"); // link: 41
    WebPageAddUrl("http://www.cnn.com/virtual/2000/code/main.js");
    WebPageAddUrl("http://www.cnn.com/CAREER/drag_it.js");
    // Redirecting to http://m.doubleclick.net/
    //                   viewad/491636-am_ban_trvl_x2_x_468x60_3.gif
    WebPageAddUrl("http://www.cnn.com/CAREER/images/arrow_orange.gif");
    WebPageLink("CAREER", "CNN.com - Career"); // link: 75
    WebPageUrl("http://www.cnn.com/CAREER/careercenter/
                                  careerNextCareer.html", "Untitled");
    WebPageBack();
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/travel.css");
    WebPageLink("TRAVEL", "CNN.com - TravelGuide"); // link: 53
 
    ThinkTime(11.2);
    WebPageAddUrl("http://www.cnn.com/virtual/1998/code/cnn.js");
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/main.css");
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/food.css");
    // Redirecting to http://www.cnn.com/images/hub2000/ad.info.gif
    WebPageLink("FOOD", "CNN.com Food Central"); // link: 52
 
    ThinkTime(5.8);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/style.css");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/fashion_on.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/design_on.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/art_on.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/onair_on.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/resources_on.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/fashion_over.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/design_over.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/art_over.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/onair_over.gif");
    WebPageAddUrl("http://www.cnn.com/images/1999/10/resources_over.gif");
    WebPageLink("ARTS &STYLE", "CNN.com - arts &? style"); // link: 54
 
    ThinkTime(2.8);
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/nature.css");
    // Redirecting to http://ad.doubleclick.net/
    //                    viewad/504243/begin_mp3_468_1.gif
    // Redirecting to http://ad.doubleclick.net/
    //                    viewad/504243/begin_mp3_468_1.gif
    WebPageLink("NATURE", "CNN.com - Nature"); // link: 73
 
    ThinkTime(12.8);
    WebPageAddUrl("http://www.cnn.com/virtual/1998/code/cnn.css");
    WebPageLink("LOCAL", "CNN - Your Local Link"); // link: 78
    // Redirecting to http://m.doubleclick.net/viewad/393189-cubanner_05.gif
    WebUrl("http://ad.doubleclick.net/ad/N828.cnn/B18341;
                                sz=468x60;ord=2000.11.13.15.50.19.0", 
      5.25);
    // form found in stored context
    // Redirecting to http://www.cnn.com/WEATHER/ne/PA/TrevosePATV.html
    WebPageAddUrl("http://www.cnn.com/virtual/2000/code/main.js");
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/main.css");
    WebPageAddUrl("http://www.cnn.com/virtual/2000/style/weather.css");
    WebPageAddUrl("http://www.cnn.com/virtual/weather/vector.js");
    WebPageSubmit("go", FORM002, "CNN.com - Weather - Trevose, PA"); 
                                                           // form: 5
 
    WebPageDeleteContext(hContext1);
    WebCookieSet(
      "CNNid=Gcf1947e6-2988-974130592-7; path=/; 
                         domain=.com; expires=Sat, 13 Nov 2010 15:51:11"
      " GMT", "http://cnn.com/");
    WebPageLink("CNN.com", "CNN.com"); // link: 7
 
    ThinkTime(6.4);
    WebPageBack();
    WebCookieSet(
      "CNNid=Gcf1947e6-2988-974130592-7; path=/; domain=.com; 
                                     expires=Sat, 13 Nov 2010 15:51:24"
      " GMT", "http://cnn.com/");
    WebPageLink("thumbnail map", "CNN - Weather Forecast for 
                                             North America - Today", 4);
      // link: 145
  end TMain;
dclform
  NC_RD001:
    "type"                    := "script;cid=102016;sid=300;click=";
  FORM002:
    //"zip"                     := "19116";
      "zip"                     := "C:\Program Files\Segue\
                                    SilkPerformer 4.0\Working\Data\zip.txt";

Back to Article


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.