<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Jay Harris is Cpt. LoadTest - Performance</title>
    <link>http://www.cptloadtest.com/</link>
    <description>a .net developers blog on improving user experience of humans and coders</description>
    <language>en-us</language>
    <copyright>Jason Harris</copyright>
    <lastBuildDate>Sun, 16 Oct 2005 17:41:01 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.12105.0</generator>
    <managingEditor>jharris@harrisdesigns.com</managingEditor>
    <webMaster>jharris@harrisdesigns.com</webMaster>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=7dcbc600-fa83-4503-9077-040074103484</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,7dcbc600-fa83-4503-9077-040074103484.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,7dcbc600-fa83-4503-9077-040074103484.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=7dcbc600-fa83-4503-9077-040074103484</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Outside of the QA world (and unfortunately, sometimes in the QA world), I’ve heard
people toss around ‘Performance Testing’, ‘Load Testing’, ‘Scalability Testing’, and
‘Stress Testing’, yet always mean the same thing. My clients do this. My project managers
do this. My fellow developers do this. It doesn’t bother me–I’m not some QA psycho
that harasses anyone that doesn’t use exactly the correct term–but I do smirk on the
inside whenever one of these offenses occurs.
</p>
        <p>
Performance testing is not load testing is not scalability testing is not stress testing.
They are not the same thing. They closely relate, but they are not the same thing.
</p>
        <blockquote>
          <ul>
            <li>
Load testing is testing that involves applying a load to the system.</li>
            <li>
Performance testing evaluates how well the system performs.</li>
            <li>
Stress testing looks at how the system behaves under a heavy load.</li>
            <li>
Scalability testing investigates how well the system scales as the load and/or resources
are increased.</li>
          </ul>
          <p>
Alexander Podelko, Load Testing in a Diverse Environment, <em>Software Test &amp;
Performance</em>, October 2005.
</p>
        </blockquote>
        <h3>Performance Testing
</h3>
        <p>
Any type of testing–and I mean <em>any</em> type–that measures the performance (essentially,
speed) of the system in question. Measuring the speed at which your database cluster
switches from the primary to secondary database server when the primary is unplugged
is a performance test and has nothing to do with the load on the system.
</p>
        <h3>Load Testing
</h3>
        <p>
Any type of test that is dependent upon load or a specific load being placed on the
system. Load testing is not always a performance test. When 25 transactions per second
(tps) are placed on a web site, and the load balancer is monitored to ensure that
traffic is being properly distributed to the farm, you are load testing without a
care for performance.
</p>
        <h3>Stress Testing
</h3>
        <p>
Here is where I disagree with Alexander: stress testing places some sort of unexpected
stress on the system, but does not have to be a heavy load. Stress testing could include
testing a web server where one of its two processors have failed, a load-balanced
farm with some if its servers dropped from the cluster, a wireless system with a weak
signal or increased signal noise, or a laptop outside in below-freezing temperatures.
</p>
        <h3>Scalability Testing
</h3>
        <p>
Testing how well a system scales also is independent of load or resources, but still
relies on load or resources. Does a system produce timeout errors when you increase
the load from 20tps to 40tps? At 40tps, does the system produce less timeout errors
as the number of web servers in the farm is increased from 2 servers to 4? Or when
the Dell PowerEdge 2300s are replaced with PE2500s?
</p>
        <hr />
        <p>
Any type of testing in QA is vague. This includes the countless types of functional
testing, reliability testing, performance testing, and so on. Often time a single
test can fit into a handful of testing categories. Testing how fast the login page
loads after three days of 20tps traffic can be a load test, a performance test, and
a reliability test. The type of testing that it should be categorized as is dependent
upon what you are trying to do or achieve. Under this example, it is a performance
testing, since the goal is to measure ‘how fast’. If you change the question to ‘is
it slower after three days’, then it is a reliability test. The point is that no matter
where the test fits in your “Venn Diagram of QA,” the true identify of a test is based
on what you are trying to get out of it. The rest is just a means to an end.
</p>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=7dcbc600-fa83-4503-9077-040074103484" />
      </body>
      <title>Performance Testing != Load Testing</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,7dcbc600-fa83-4503-9077-040074103484.aspx</guid>
      <link>http://www.cptloadtest.com/2005/10/16/Performance-Testing-Load-Testing.aspx</link>
      <pubDate>Sun, 16 Oct 2005 17:41:01 GMT</pubDate>
      <description>&lt;p&gt;
Outside of the QA world (and unfortunately, sometimes in the QA world), I’ve heard
people toss around ‘Performance Testing’, ‘Load Testing’, ‘Scalability Testing’, and
‘Stress Testing’, yet always mean the same thing. My clients do this. My project managers
do this. My fellow developers do this. It doesn’t bother me–I’m not some QA psycho
that harasses anyone that doesn’t use exactly the correct term–but I do smirk on the
inside whenever one of these offenses occurs.
&lt;/p&gt;
&lt;p&gt;
Performance testing is not load testing is not scalability testing is not stress testing.
They are not the same thing. They closely relate, but they are not the same thing.
&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
Load testing is testing that involves applying a load to the system.&lt;/li&gt;
&lt;li&gt;
Performance testing evaluates how well the system performs.&lt;/li&gt;
&lt;li&gt;
Stress testing looks at how the system behaves under a heavy load.&lt;/li&gt;
&lt;li&gt;
Scalability testing investigates how well the system scales as the load and/or resources
are increased.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Alexander Podelko, Load Testing in a Diverse Environment, &lt;em&gt;Software Test &amp;amp;
Performance&lt;/em&gt;, October 2005.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;h3&gt;Performance Testing
&lt;/h3&gt;
&lt;p&gt;
Any type of testing–and I mean &lt;em&gt;any&lt;/em&gt; type–that measures the performance (essentially,
speed) of the system in question. Measuring the speed at which your database cluster
switches from the primary to secondary database server when the primary is unplugged
is a performance test and has nothing to do with the load on the system.
&lt;/p&gt;
&lt;h3&gt;Load Testing
&lt;/h3&gt;
&lt;p&gt;
Any type of test that is dependent upon load or a specific load being placed on the
system. Load testing is not always a performance test. When 25 transactions per second
(tps) are placed on a web site, and the load balancer is monitored to ensure that
traffic is being properly distributed to the farm, you are load testing without a
care for performance.
&lt;/p&gt;
&lt;h3&gt;Stress Testing
&lt;/h3&gt;
&lt;p&gt;
Here is where I disagree with Alexander: stress testing places some sort of unexpected
stress on the system, but does not have to be a heavy load. Stress testing could include
testing a web server where one of its two processors have failed, a load-balanced
farm with some if its servers dropped from the cluster, a wireless system with a weak
signal or increased signal noise, or a laptop outside in below-freezing temperatures.
&lt;/p&gt;
&lt;h3&gt;Scalability Testing
&lt;/h3&gt;
&lt;p&gt;
Testing how well a system scales also is independent of load or resources, but still
relies on load or resources. Does a system produce timeout errors when you increase
the load from 20tps to 40tps? At 40tps, does the system produce less timeout errors
as the number of web servers in the farm is increased from 2 servers to 4? Or when
the Dell PowerEdge 2300s are replaced with PE2500s?
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;
Any type of testing in QA is vague. This includes the countless types of functional
testing, reliability testing, performance testing, and so on. Often time a single
test can fit into a handful of testing categories. Testing how fast the login page
loads after three days of 20tps traffic can be a load test, a performance test, and
a reliability test. The type of testing that it should be categorized as is dependent
upon what you are trying to do or achieve. Under this example, it is a performance
testing, since the goal is to measure ‘how fast’. If you change the question to ‘is
it slower after three days’, then it is a reliability test. The point is that no matter
where the test fits in your “Venn Diagram of QA,” the true identify of a test is based
on what you are trying to get out of it. The rest is just a means to an end.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=7dcbc600-fa83-4503-9077-040074103484" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,7dcbc600-fa83-4503-9077-040074103484.aspx</comments>
      <category>Performance</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=8c1f277e-a561-4bca-99e7-facfa9e2583c</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,8c1f277e-a561-4bca-99e7-facfa9e2583c.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,8c1f277e-a561-4bca-99e7-facfa9e2583c.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=8c1f277e-a561-4bca-99e7-facfa9e2583c</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I know. I haven’t posted in a while. But I’ve been crazy busy. Twelve hour days are
my norm, right now. But enough complaining; let’s get to the good stuff.
</p>
        <p>
By now you know my love for PsExec. I discovered it when trying to find a way to add
assemblies to a remote GAC [<a href="http://www.cptloadtest.com/?cat=8">post</a>].
I’ve found more love for it. Now, I can remotely execute my performance tests!
</p>
        <h3>Execute LoadRunner test using NAnt via LoadRunner:
</h3>
        <pre name="code" class="xml">&lt;exec basedir="${P1}"
  program="psexec"
  failonerror="false"
  commandline='\${P2} /u ${P3} /p ${P4} /i /w "${P5}" cmd /c wlrun -Run
    -InvokeAnalysis -TestPath "${P6}" -ResultLocation "${P7}"
    -ResultCleanName "${P8}"' /&gt;
</pre>
        <p>
(I’ve created generic parameter names so that you can read it a little better.)<br /><strong>P1</strong>: Local directory for PsExec<br /><strong>P2</strong>: LoadRunner Controller Server name<br /><strong>P3</strong>: LoadRunner Controller Server user username. I use an Admin-level
ID here, since this ID also needs rights to capture Windows PerfMon metrics on my
app servers.<br /><strong>P4</strong>: LoadRunner Controller Server user password<br /><strong>P5</strong>: Working directory on P2 for 'wlrun.exe', such as C:\Program Files\Mercury\Mercury
LoadRunner\bin<br /><strong>P6</strong>: Path on P2 to the LoadRunner scenario file<br /><strong>P7</strong>: Directory on P2 that contains all results from every test<br /><strong>P8</strong>: Result Set name for this test run
</p>
        <p>
'-InvokeAnalysis' will automatically execute LoadRunner analysis at test completion.
If you properly configure your Analysis default template, Analysis will automatically
generate the result set you want, save the Analysis session information, and create
a HTML report of the results. Now, put IIS on your Controller machine, and VDir to
the main results directory in P7, and you will have access to the HTML report within
minutes after your test completes.
</p>
        <h4>Other ideas:
</h4>
        <ul>
          <li>
You can also hook it up to CruiseControl and have your CC.Net report include a link
to the LR report.</li>
          <li>
Create a nightly build in CC.Net that will compile your code, deploy it to your performance
testing environment, and execute the performance test. When you get to work in the
morning, you have a link to your full performance test report waiting in your inbox.</li>
        </ul>
        <p>
The catch for all of this: you need a session logged in to the LoadRunner controller
box at all times. The '/i' in the PsExec command means that it interacts with the
desktop.
</p>
        <h4>
          <em>Sidenote</em>
        </h4>
        <p>
PsExec is my favorite tool right now. I can do so many cool things. I admit, as a
domain administrator, I also get a little malicious, sometimes. The other day I used
PsExec to start up solitaire on a co-workers box, then razzed him for playing games
on the clock.
</p>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=8c1f277e-a561-4bca-99e7-facfa9e2583c" />
      </body>
      <title>Automate LoadRunner through NAnt</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,8c1f277e-a561-4bca-99e7-facfa9e2583c.aspx</guid>
      <link>http://www.cptloadtest.com/2005/10/14/Automate-LoadRunner-Through-NAnt.aspx</link>
      <pubDate>Fri, 14 Oct 2005 15:35:40 GMT</pubDate>
      <description>&lt;p&gt;
I know. I haven’t posted in a while. But I’ve been crazy busy. Twelve hour days are
my norm, right now. But enough complaining; let’s get to the good stuff.
&lt;/p&gt;
&lt;p&gt;
By now you know my love for PsExec. I discovered it when trying to find a way to add
assemblies to a remote GAC [&lt;a href="http://www.cptloadtest.com/?cat=8"&gt;post&lt;/a&gt;].
I’ve found more love for it. Now, I can remotely execute my performance tests!
&lt;/p&gt;
&lt;h3&gt;Execute LoadRunner test using NAnt via LoadRunner:
&lt;/h3&gt;
&lt;pre name="code" class="xml"&gt;&amp;lt;exec basedir="${P1}"
  program="psexec"
  failonerror="false"
  commandline='\${P2} /u ${P3} /p ${P4} /i /w "${P5}" cmd /c wlrun -Run
    -InvokeAnalysis -TestPath "${P6}" -ResultLocation "${P7}"
    -ResultCleanName "${P8}"' /&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
(I’ve created generic parameter names so that you can read it a little better.)&lt;br&gt;
&lt;strong&gt;P1&lt;/strong&gt;: Local directory for PsExec&lt;br&gt;
&lt;strong&gt;P2&lt;/strong&gt;: LoadRunner Controller Server name&lt;br&gt;
&lt;strong&gt;P3&lt;/strong&gt;: LoadRunner Controller Server user username. I use an Admin-level
ID here, since this ID also needs rights to capture Windows PerfMon metrics on my
app servers.&lt;br&gt;
&lt;strong&gt;P4&lt;/strong&gt;: LoadRunner Controller Server user password&lt;br&gt;
&lt;strong&gt;P5&lt;/strong&gt;: Working directory on P2 for 'wlrun.exe', such as C:\Program Files\Mercury\Mercury
LoadRunner\bin&lt;br&gt;
&lt;strong&gt;P6&lt;/strong&gt;: Path on P2 to the LoadRunner scenario file&lt;br&gt;
&lt;strong&gt;P7&lt;/strong&gt;: Directory on P2 that contains all results from every test&lt;br&gt;
&lt;strong&gt;P8&lt;/strong&gt;: Result Set name for this test run
&lt;/p&gt;
&lt;p&gt;
'-InvokeAnalysis' will automatically execute LoadRunner analysis at test completion.
If you properly configure your Analysis default template, Analysis will automatically
generate the result set you want, save the Analysis session information, and create
a HTML report of the results. Now, put IIS on your Controller machine, and VDir to
the main results directory in P7, and you will have access to the HTML report within
minutes after your test completes.
&lt;/p&gt;
&lt;h4&gt;Other ideas:
&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;
You can also hook it up to CruiseControl and have your CC.Net report include a link
to the LR report.&lt;/li&gt;
&lt;li&gt;
Create a nightly build in CC.Net that will compile your code, deploy it to your performance
testing environment, and execute the performance test. When you get to work in the
morning, you have a link to your full performance test report waiting in your inbox.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The catch for all of this: you need a session logged in to the LoadRunner controller
box at all times. The '/i' in the PsExec command means that it interacts with the
desktop.
&lt;/p&gt;
&lt;h4&gt;&lt;em&gt;Sidenote&lt;/em&gt;
&lt;/h4&gt;
&lt;p&gt;
PsExec is my favorite tool right now. I can do so many cool things. I admit, as a
domain administrator, I also get a little malicious, sometimes. The other day I used
PsExec to start up solitaire on a co-workers box, then razzed him for playing games
on the clock.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=8c1f277e-a561-4bca-99e7-facfa9e2583c" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,8c1f277e-a561-4bca-99e7-facfa9e2583c.aspx</comments>
      <category>Continuous Integration</category>
      <category>NAnt</category>
      <category>Performance</category>
      <category>Task Automation</category>
      <category>Testing</category>
      <category>LoadRunner</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=5fce494c-19d2-4615-a8f4-54e490b71921</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,5fce494c-19d2-4615-a8f4-54e490b71921.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,5fce494c-19d2-4615-a8f4-54e490b71921.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=5fce494c-19d2-4615-a8f4-54e490b71921</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In the QA forums I frequent, there are often questions about how to properly load
test when you don’t have access to production or an identically built environment.
Most companies won’t spring the cash to build an environment that is identical
to production; generally, testing environments are made up of hand-me-down servers
that <em>used</em> to be in production. Of course, there is also the cost of test
suite licensing to produce a productional load, and the near impossibility of mimicking
real production traffic.
</p>
        <p>
Though a production clone would be ideal, a watered down environment can be sufficient,
and in some ways better. Bottlenecks are achieved faster, without having to push through
50 Mbps of data. Additionally, a “lesser” environment will be more sensitive
to changes; your transaction may take 0.5 seconds on production-grade servers, and
a defect that doubles it to 1.0 seconds is hardly noticeable, but on a lesser environment
where that transaction takes 6.0 seconds, doubling it to twelve throws up red flags.
</p>
        <p>
For a watered-down environment, try to lessen the horsepower of your system while
matching the architecture. If your productional environment is eight web servers that
are all quad 3.2 Ghz Xeons running Windows Server 2003 Web Edition, and all load balanced
through a hardware load balancer, you can bring it down to two web servers with less
horsepower–perhaps dual 700Mhz P3s–but the servers should still run Windows
Server 2003 Web Edition and be balanced with a hardware balancer. Do not drop below
two web servers because you will still want a load balanced environment, and do not
switch to Windows 2000 or use Microsoft’s NLB (Network Load Balancing). If your
production web environment uses Windows 2000 and NLB, obviously use that technology
in your testing environment; do not switch to Windows 2003 or a hardware load balancer.
</p>
        <p>
Additionally, try to reduce equally throughout your environment. Don’t drop
your web servers from Pentium 4s to Pentium 3s while dropping your database servers
from Pentium 4s to an old 486 desktop. Equal reductions maintain your continuity,
and in the end, your sanity. Unequal reductions introduce new problems that don’t
exist in production, but will still happily waste your time and money. A major bottleneck
might exist on your web servers, but the defect could be masked because you were database-bound
by using that old 486.
</p>
        <p>
The idea behind this is that many bugs can be introduced by a specific revision of
your OS (Think of the problems from Windows XP SP2), from your style of network infrastructure,
the version of your graphics driver, etc. You want as many common points as possible
between your testing and production environments to eliminate any surprises when you
launch your application. Ideally, your testing environment is an exact replica of
your production environment, but unless you are making desktop applications, it is
only a fantasy, so just try to get as close as you can. Use the same OS version, including
the same service pack and the same installed hot fixes. Use the same driver versions,
and configure the same settings on your web server software. You are trying to create
a miniature version of your production environment, like a model car or a ship in
a bottle. Pay attention to the details and you will be okay. To your application,
the environments should be exactly the same; one is just a little snug.
</p>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=5fce494c-19d2-4615-a8f4-54e490b71921" />
      </body>
      <title>A watered down test environment</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,5fce494c-19d2-4615-a8f4-54e490b71921.aspx</guid>
      <link>http://www.cptloadtest.com/2005/05/25/A-Watered-Down-Test-Environment.aspx</link>
      <pubDate>Wed, 25 May 2005 18:32:15 GMT</pubDate>
      <description>&lt;p&gt;
In the QA forums I frequent, there are often questions about how to properly load
test when you don&amp;#8217;t have access to production or an identically built environment.
Most companies won&amp;#8217;t spring the cash to build an environment that is identical
to production; generally, testing environments are made up of hand-me-down servers
that &lt;em&gt;used&lt;/em&gt; to be in production. Of course, there is also the cost of test
suite licensing to produce a productional load, and the near impossibility of mimicking
real production traffic.
&lt;/p&gt;
&lt;p&gt;
Though a production clone would be ideal, a watered down environment can be sufficient,
and in some ways better. Bottlenecks are achieved faster, without having to push through
50 Mbps of data. Additionally, a &amp;#8220;lesser&amp;#8221; environment will be more sensitive
to changes; your transaction may take 0.5 seconds on production-grade servers, and
a defect that doubles it to 1.0 seconds is hardly noticeable, but on a lesser environment
where that transaction takes 6.0 seconds, doubling it to twelve throws up red flags.
&lt;/p&gt;
&lt;p&gt;
For a watered-down environment, try to lessen the horsepower of your system while
matching the architecture. If your productional environment is eight web servers that
are all quad 3.2 Ghz Xeons running Windows Server 2003 Web Edition, and all load balanced
through a hardware load balancer, you can bring it down to two web servers with less
horsepower&amp;#8211;perhaps dual 700Mhz P3s&amp;#8211;but the servers should still run Windows
Server 2003 Web Edition and be balanced with a hardware balancer. Do not drop below
two web servers because you will still want a load balanced environment, and do not
switch to Windows 2000 or use Microsoft&amp;#8217;s NLB (Network Load Balancing). If your
production web environment uses Windows 2000 and NLB, obviously use that technology
in your testing environment; do not switch to Windows 2003 or a hardware load balancer.
&lt;/p&gt;
&lt;p&gt;
Additionally, try to reduce equally throughout your environment. Don&amp;#8217;t drop
your web servers from Pentium 4s to Pentium 3s while dropping your database servers
from Pentium 4s to an old 486 desktop. Equal reductions maintain your continuity,
and in the end, your sanity. Unequal reductions introduce new problems that don&amp;#8217;t
exist in production, but will still happily waste your time and money. A major bottleneck
might exist on your web servers, but the defect could be masked because you were database-bound
by using that old 486.
&lt;/p&gt;
&lt;p&gt;
The idea behind this is that many bugs can be introduced by a specific revision of
your OS (Think of the problems from Windows XP SP2), from your style of network infrastructure,
the version of your graphics driver, etc. You want as many common points as possible
between your testing and production environments to eliminate any surprises when you
launch your application. Ideally, your testing environment is an exact replica of
your production environment, but unless you are making desktop applications, it is
only a fantasy, so just try to get as close as you can. Use the same OS version, including
the same service pack and the same installed hot fixes. Use the same driver versions,
and configure the same settings on your web server software. You are trying to create
a miniature version of your production environment, like a model car or a ship in
a bottle. Pay attention to the details and you will be okay. To your application,
the environments should be exactly the same; one is just a little snug.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=5fce494c-19d2-4615-a8f4-54e490b71921" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,5fce494c-19d2-4615-a8f4-54e490b71921.aspx</comments>
      <category>Performance</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=1a8479d9-2dcb-4bd5-9336-4f1ace96cb21</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,1a8479d9-2dcb-4bd5-9336-4f1ace96cb21.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,1a8479d9-2dcb-4bd5-9336-4f1ace96cb21.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1a8479d9-2dcb-4bd5-9336-4f1ace96cb21</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For love of all things QA, before you launch a new application, test production!
</p>
        <p>
“What? That’s stupid! Why would I want to perform a load test production and risk
an outage? That impacts my <a href="http://en.wikipedia.org/wiki/Service_Level_Agreement">SLAs</a>.
I can’t impact my SLAs!”
</p>
        <p>
Remember the number one rule of quality control: if you don’t find it, your customers
will.
</p>
        <p>
When you are about to launch a brand new application into your production environment,
test that application against production. However, this only applies for <em>new</em> applications.
New applications will introduce new, additional load on the environment, while existing,
revised applications already have added that load to the system. Essentially, with
an existing application, you already know how well the production environment can
handle the additional demand generated by the application’s audience. New applications
have not yet generated that load, and production has yet to prove itself.
</p>
        <p>
There is no hard evidence that production can take the additional demand. Maybe your
production load balancer can only handle another 5 MB/s, and your new application
will demand another 7. Perhaps it is one of the switches, instead. Or for my recent
life, maybe it is your ISP. You will not know until you test it, until you measure
it, and “if you didn’t measure it, you didn’t do it.”
</p>
        <p>
With a past project, my company created an intranet application for our client, and
our application just happened to be hosted off-site. The off-site environment was
green, and wasn’t hosting anything else, so our client had no issue with us testing
this environment fully since it <em>was</em> going to be production, but wasn’t <em>yet</em>.
The hosting company and their ISP rated the environment at 45 Mbps (That’s megabits–lower-case
‘b’), and based on the clients traffic expectations, we needed about 30. It is a good
thing we tested the site because we found an issue with the load balancer at about
15 Mbps, a problem with server memory when it was processing enough transactions to
produce 20 Mbps, a problem with the database switches when we were generating 22 Mbps,
and–this one is the kicker–a bandwidth ceiling at 28. Though all of the routers, switches,
balancers, and servers were performing well, we couldn’t get more than 28 Mbps to
the web servers. It turns out that the ISP didn’t ever expect anyone to <em>use</em> that
45 Mbps rating, and never tested to make sure they could handle it.
</p>
        <blockquote>“If you didn’t measure it, you didn’t do it.”</blockquote>
        <p>
Through two months of midnight through 0600 testing, we upgraded the load balancer,
added more memory, put in gigabit switches, had the ISP tweak their infrastructure,
pushed through all of the data we needed, and successfully proved that the off-site
environment and our new application could handle the load. But, the environment still
wasn’t fully tested. Our client used everyone’s favorite single-signon, SiteMinder.
However, they wouldn’t let us test the application while integrating their productional
SiteMinder policy servers. We could only use staging, and when the staging servers
couldn’t handle the load, “that’s okay because it’s staging.” But no matter how much
we advocated, we couldn’t test production. We might impact the environment and the
SLAs. So, we launched without testing it, and guess what happened? The policy servers
failed, and they severely impacted their SLAs.
</p>
        <p>
And to think, we could have tested that at 1:00 AM on a Saturday, and they even if
we fried the policy servers, they would have had all weekend to fix it. And most importantly,
we would have identified it before the end-user did. But what really cooked their
goose was the difference between productional load and performance testing load: performance
tests can be stopped. It is a lot harder to fix a jet engine at 30,000 ft.
</p>
        <p>
The moral of the story: when launching a new application, always test production.
Always.
</p>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=1a8479d9-2dcb-4bd5-9336-4f1ace96cb21" />
      </body>
      <title>Performance test production!</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,1a8479d9-2dcb-4bd5-9336-4f1ace96cb21.aspx</guid>
      <link>http://www.cptloadtest.com/2005/05/23/Performance-Test-Production.aspx</link>
      <pubDate>Mon, 23 May 2005 18:35:26 GMT</pubDate>
      <description>&lt;p&gt;
For love of all things QA, before you launch a new application, test production!
&lt;/p&gt;
&lt;p&gt;
“What? That’s stupid! Why would I want to perform a load test production and risk
an outage? That impacts my &lt;a href="http://en.wikipedia.org/wiki/Service_Level_Agreement"&gt;SLAs&lt;/a&gt;.
I can’t impact my SLAs!”
&lt;/p&gt;
&lt;p&gt;
Remember the number one rule of quality control: if you don’t find it, your customers
will.
&lt;/p&gt;
&lt;p&gt;
When you are about to launch a brand new application into your production environment,
test that application against production. However, this only applies for &lt;em&gt;new&lt;/em&gt; applications.
New applications will introduce new, additional load on the environment, while existing,
revised applications already have added that load to the system. Essentially, with
an existing application, you already know how well the production environment can
handle the additional demand generated by the application’s audience. New applications
have not yet generated that load, and production has yet to prove itself.
&lt;/p&gt;
&lt;p&gt;
There is no hard evidence that production can take the additional demand. Maybe your
production load balancer can only handle another 5 MB/s, and your new application
will demand another 7. Perhaps it is one of the switches, instead. Or for my recent
life, maybe it is your ISP. You will not know until you test it, until you measure
it, and “if you didn’t measure it, you didn’t do it.”
&lt;/p&gt;
&lt;p&gt;
With a past project, my company created an intranet application for our client, and
our application just happened to be hosted off-site. The off-site environment was
green, and wasn’t hosting anything else, so our client had no issue with us testing
this environment fully since it &lt;em&gt;was&lt;/em&gt; going to be production, but wasn’t &lt;em&gt;yet&lt;/em&gt;.
The hosting company and their ISP rated the environment at 45 Mbps (That’s megabits–lower-case
‘b’), and based on the clients traffic expectations, we needed about 30. It is a good
thing we tested the site because we found an issue with the load balancer at about
15 Mbps, a problem with server memory when it was processing enough transactions to
produce 20 Mbps, a problem with the database switches when we were generating 22 Mbps,
and–this one is the kicker–a bandwidth ceiling at 28. Though all of the routers, switches,
balancers, and servers were performing well, we couldn’t get more than 28 Mbps to
the web servers. It turns out that the ISP didn’t ever expect anyone to &lt;em&gt;use&lt;/em&gt; that
45 Mbps rating, and never tested to make sure they could handle it.
&lt;/p&gt;
&lt;blockquote&gt;“If you didn’t measure it, you didn’t do it.”&lt;/blockquote&gt; 
&lt;p&gt;
Through two months of midnight through 0600 testing, we upgraded the load balancer,
added more memory, put in gigabit switches, had the ISP tweak their infrastructure,
pushed through all of the data we needed, and successfully proved that the off-site
environment and our new application could handle the load. But, the environment still
wasn’t fully tested. Our client used everyone’s favorite single-signon, SiteMinder.
However, they wouldn’t let us test the application while integrating their productional
SiteMinder policy servers. We could only use staging, and when the staging servers
couldn’t handle the load, “that’s okay because it’s staging.” But no matter how much
we advocated, we couldn’t test production. We might impact the environment and the
SLAs. So, we launched without testing it, and guess what happened? The policy servers
failed, and they severely impacted their SLAs.
&lt;/p&gt;
&lt;p&gt;
And to think, we could have tested that at 1:00 AM on a Saturday, and they even if
we fried the policy servers, they would have had all weekend to fix it. And most importantly,
we would have identified it before the end-user did. But what really cooked their
goose was the difference between productional load and performance testing load: performance
tests can be stopped. It is a lot harder to fix a jet engine at 30,000 ft.
&lt;/p&gt;
&lt;p&gt;
The moral of the story: when launching a new application, always test production.
Always.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=1a8479d9-2dcb-4bd5-9336-4f1ace96cb21" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,1a8479d9-2dcb-4bd5-9336-4f1ace96cb21.aspx</comments>
      <category>Performance</category>
      <category>Testing</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=0964d50c-1006-43e1-9252-214ea493e598</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,0964d50c-1006-43e1-9252-214ea493e598.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,0964d50c-1006-43e1-9252-214ea493e598.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=0964d50c-1006-43e1-9252-214ea493e598</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For my needs, the biggest hole in Mercury LoadRunner is its lack of page size monitoring.
LoadRunner can monitor anything else imaginable, including transaction counts, transaction
times, errors, and all Windows Performance Monitor metrics. However, monitoring page
size, download times, and HTTP Return codes are only available through programming.
</p>
        <p>
The following function will monitor the page size of all responses, logging an error
if it exceeds you specified limit, as well as track all values on the user-defined
graphs.
</p>
        <pre name="code" class="cpp">si_page_size_limit(int PageLimit, char* PageName, char *PageURL, long TransactionID){
//
// Page Size Limit Monitor
// Author: Jay Harris, http://www.cptloadtest.com, (c) 2004 Jason Harris
// License: This work is licensed under a
//    Creative Commons Attribution 3.0 United States License.
//    http://creativecommons.org/licenses/by/3.0/us/
//
// Created: 10-Aug-2004
// Last Modified: 10-May-2005, Jay Harris
//
// Description:
// Logs an error to the log, pass or fail, including the applicable status, if logging is enabled.
// Plots page size datapoint to User Defined graph.
//
// Inputs:
// int PageLimit Maximum page size allowed, in bytes
// char* PageName Name of the page, such as the Title. For identification in logs.
// char* PageURL URL of the page. For reference in logs. FOr identification in logs.
// long TransactionID Transaction ID for the current request.
// Note: Transaction must be explicitly opened via lr_start_transaction_instance.
// Note: TransactionID is returned by lr_start_transaction_instance.
//
 
    int iPageSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
    char DataPointName[1024] = “Response Size [”;
    strcat(DataPointName, PageName);
    strcat(DataPointName, “]”);

    if (PageLimit &lt; iPageSize) {
        lr_continue_on_error(1);
        lr_debug_message(LR_MSG_CLASS_BRIEF_LOG | LR_MSG_CLASS_EXTENDED_LOG,
	    “Page Size Check FAILED - %s [%s] exceeds specified page size limit of %d (Total: %d)”,
	    PageName,PageURL,PageLimit,iPageSize);
        lr_continue_on_error(0);
    } else {
        lr_debug_message(LR_MSG_CLASS_BRIEF_LOG | LR_MSG_CLASS_EXTENDED_LOG,
	    “Page Size Check PASSED - %s [%s] meets specified page size limit of %d (Total: %d)”,
	    PageName,PageURL,PageLimit,iPageSize);
    }
    if (lr_get_trans_instance_status(TransactionID) == LR_PASS) {
        lr_user_data_point_instance_ex(DataPointName,iPageSize,TransactionID,DP_FLAGS_EXTENDED_LOG);
    }
    return 0;
}</pre>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=0964d50c-1006-43e1-9252-214ea493e598" />
      </body>
      <title>Page Size Monitor in LoadRunner</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,0964d50c-1006-43e1-9252-214ea493e598.aspx</guid>
      <link>http://www.cptloadtest.com/2005/05/10/Page-Size-Monitor-In-LoadRunner.aspx</link>
      <pubDate>Tue, 10 May 2005 18:51:58 GMT</pubDate>
      <description>&lt;p&gt;
For my needs, the biggest hole in Mercury LoadRunner is its lack of page size monitoring.
LoadRunner can monitor anything else imaginable, including transaction counts, transaction
times, errors, and all Windows Performance Monitor metrics. However, monitoring page
size, download times, and HTTP Return codes are only available through programming.
&lt;/p&gt;
&lt;p&gt;
The following function will monitor the page size of all responses, logging an error
if it exceeds you specified limit, as well as track all values on the user-defined
graphs.
&lt;/p&gt;
&lt;pre name="code" class="cpp"&gt;si_page_size_limit(int PageLimit, char* PageName, char *PageURL, long TransactionID){
//
// Page Size Limit Monitor
// Author: Jay Harris, http://www.cptloadtest.com, (c) 2004 Jason Harris
// License: This work is licensed under a
//    Creative Commons Attribution 3.0 United States License.
//    http://creativecommons.org/licenses/by/3.0/us/
//
// Created: 10-Aug-2004
// Last Modified: 10-May-2005, Jay Harris
//
// Description:
// Logs an error to the log, pass or fail, including the applicable status, if logging is enabled.
// Plots page size datapoint to User Defined graph.
//
// Inputs:
// int PageLimit Maximum page size allowed, in bytes
// char* PageName Name of the page, such as the Title. For identification in logs.
// char* PageURL URL of the page. For reference in logs. FOr identification in logs.
// long TransactionID Transaction ID for the current request.
// Note: Transaction must be explicitly opened via lr_start_transaction_instance.
// Note: TransactionID is returned by lr_start_transaction_instance.
//
 
    int iPageSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
    char DataPointName[1024] = “Response Size [”;
    strcat(DataPointName, PageName);
    strcat(DataPointName, “]”);

    if (PageLimit &amp;lt; iPageSize) {
        lr_continue_on_error(1);
        lr_debug_message(LR_MSG_CLASS_BRIEF_LOG | LR_MSG_CLASS_EXTENDED_LOG,
	    “Page Size Check FAILED - %s [%s] exceeds specified page size limit of %d (Total: %d)”,
	    PageName,PageURL,PageLimit,iPageSize);
        lr_continue_on_error(0);
    } else {
        lr_debug_message(LR_MSG_CLASS_BRIEF_LOG | LR_MSG_CLASS_EXTENDED_LOG,
	    “Page Size Check PASSED - %s [%s] meets specified page size limit of %d (Total: %d)”,
	    PageName,PageURL,PageLimit,iPageSize);
    }
    if (lr_get_trans_instance_status(TransactionID) == LR_PASS) {
        lr_user_data_point_instance_ex(DataPointName,iPageSize,TransactionID,DP_FLAGS_EXTENDED_LOG);
    }
    return 0;
}&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=0964d50c-1006-43e1-9252-214ea493e598" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,0964d50c-1006-43e1-9252-214ea493e598.aspx</comments>
      <category>LoadRunner</category>
      <category>Performance</category>
      <category>Testing</category>
    </item>
  </channel>
</rss>