As you can see by looking at Figure 3, the Cached load test
is set up similarly to the non-cached load test. To keep this test as a fair
comparison, the mix of browsers, connections and tests were kept the same. So
IE 7.0 had 84% and Firefox 16%, Lan 16%, 1.5Mbps Cable DSL 58%, and 384K Cable
DSL 26%. Finally, the similar web tests, CustomerCached.webtest, and
AllCachedReports.webtest are run with the same percentage. CustomerCached is
35% and AllCachedReports at 65%.
Figure 3: Cached Load Test Setup
The CustomerCached.webtest navigates through the CompanySales.rpt
report the same way as in the CustomerNonCached.webtest. This time it uses the
defaultcached.aspx web page, which instantiates the cached report, not the
regular report. In this case the code is as shown in code Listing 1.
protected void Page_Load(object sender, EventArgs e)
CachedCompanySales csales = new CachedCompanySales();
CrystalReportViewer1.ReportSource = csales;
In this case we use the object CachedCompanySales instead of
CompanySales. This is the default Crystal Caching object, which is created with
every report in your Visual Studio project. Just add this simple code in your
page_load event to invoke caching.
In every other way the web test is the same, other than
In the same way, AllCachedReports.webtest is used. For this,
we use defaultcached.aspx to load the CompanySales.rpt, SalesOrdercached.aspx
to load the cached salesorder.rpt report, and SalesPersonCached.aspx to load
the cached salesperson.rpt report. Each of these aspx pages loads the reports
cache object to the crystal viewer.