/* * This script was automatically converted from a Real Browser script to a Basic script. * The conversion simply runs the original script and records all http requests made * during execution. Control structures, such as loops and conditionals, are not * preserved in the conversion process. However, you can certainly add additional logic * just as you would with a Real Browser script. * * For full documentation, see: http://docs.wpm.neustar.biz/testscript-api/ */ // Get the HTTP request interface used by the browser var c = test.openHttpClient(); // By default SSL Certificates are not validated. // If you turn SSL Certificates Validation on, trying to connect // to a Server that returns an invalid SSL Certificate will throw an exception. // To turn SSL Certificate validation ON, uncomment the following line: // c.setCheckValidSSL(true); // Converted scripts don't follow redirects by default because each redirection was // converted as an additional request. If you change this, make sure you aren't // issuing multiple requests below. c.setFollowRedirects(false); // Blacklist requests made to sites like Google Analytics and DoubleClick. See the // HttpClient.blacklistCommonUrls() documentation for a list of URLs currently blocked // by this function. //c.blacklistCommonUrls(); // Because this script runs in a cloud network with much higher throughput than the // average internet user has, the following settings will throttle throughput to simulate // a business DSL line. Adjust these numbers to reflect different network conditions. test.setDownstreamKbps(1024); // 1 Mbps (max 6500 Kbps RBU, 1000 Kbps VU) test.setUpstreamKbps(384); // 384 Kbps (max 6500 Kbps RBU, 1000 Kbps VU) test.setLatency(50); // 50 ms latency // Start logging HTTP traffic and timings test.beginTransaction(); // Converted scripts make a request for every object that was loaded during the last // validation of the original script. test.beginStep("Step 1"); c.get("http://bike.ubertracks.com/", 200); test.endStep(); test.beginStep("Step 2"); c.get("http://bike.ubertracks.com/colorado-western-slope", 200); test.endStep(); test.beginStep("Step 3"); c.get("http://bike.ubertracks.com/feed/colorado-western-slope", 200); test.endStep(); test.beginStep("Step 4"); c.post("http://bike.ubertracks.com/region/subscribe", null, 302, { "email" : "mraible+load@gmail.com", "id": "3", "mimeType" : "application/x-www-form-urlencoded" }); c.get("http://bike.ubertracks.com/region/show/13", 200); test.endStep(); test.beginStep("Step 5"); c.get("http://bike.ubertracks.com/regions", 200); test.endStep(); test.beginStep("Step 6"); c.get("http://bike.ubertracks.com/region/show/3", 200); test.endStep(); test.beginStep("Step 7"); c.get("http://bike.ubertracks.com/colorado-front-range/white-ranch", 200); test.endStep(); test.beginStep("Step 8"); c.get("http://bike.ubertracks.com/colorado-front-range", 200); test.endStep(); test.beginStep("Step 9"); c.get("http://bike.ubertracks.com/region/show/3?sort=averageRating&order=desc", 200); test.endStep(); test.beginStep("Step 10"); c.get("http://bike.ubertracks.com/colorado-front-range/the-hogback", 200); test.endStep(); // Finish the transaction. For monitoring only the last transaction is recorded. An // error will be reported if no content was downloaded (or if only an error page was // loaded). test.endTransaction();