07.11.2014 Views

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

Enterprise Library Test Guide - Willy .Net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

228<br />

<strong>Enterprise</strong> <strong>Library</strong> <strong>Test</strong> <strong>Guide</strong><br />

transactions than are possible with performance counters. To do this, place a Begin-<br />

Transaction method before the first action. Place an EndTransaction method after the<br />

last action. After you save the script, you will see an icon in the Web <strong>Test</strong> Editor.<br />

The following code example shows how to add transactions to the Logging Application<br />

Block test harness.<br />

this.BeginTransaction("LogWriter");<br />

yield return request1;<br />

Web<strong>Test</strong>Request request2 = new Web<strong>Test</strong>Request("http://10.3.15.50/EntLibtests/Logging.asp);<br />

request2.Method = "POST";<br />

FormPostHttpBody request2Body = new FormPostHttpBody();<br />

request2Body.FormPostParameters.Add("__VIEWSTATE",<br />

ViewState);<br />

request2Body.FormPostParameters.Add("DropDownList1","Even<br />

tlogCatetory" );<br />

request2Body.FormPostParameters.Add("Button6", "LogCategory");<br />

request2Body.FormPostParameters.Add("__EVENTVALIDATION", EventValidation);<br />

request2.Body = request2Body;<br />

this.EndTransaction("LogWriter");<br />

yield return request2;<br />

<strong>Test</strong>ing for Scalability<br />

Scalability tests determine whether adding more system resources, such as CPUs or<br />

computers, or adding any external resources, such as SQL Server or disk arrays, can<br />

increase throughput without degrading performance. They also identify any locking<br />

problems and contention for resources that may not be found during the performance<br />

tests. Contentions problems are also called bottlenecks.<br />

Identifying Bottlenecks<br />

There are two approaches to test for bottlenecks:<br />

●<br />

●<br />

You can increase the load beyond the saturation point to see whether the throughput<br />

remains stable.<br />

You can perform the tests with computers that have 2 to 4 processors. You should<br />

do this with both 32-bit computers and 64-bit computers.<br />

The <strong>Enterprise</strong> <strong>Library</strong> scalability tests use the second approach. The main goal is to<br />

determine that contention in the code does not interfere with the application block’s<br />

throughput. <strong>Test</strong> this to see if the appropriate metrics remain stable when the loads<br />

exceed the specified constraints on the system resources.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!