QA/Automation/Projects/Endurance Tests/Documentation: Difference between revisions

Renamed micro-iterations to entities
No edit summary
(Renamed micro-iterations to entities)
Line 16: Line 16:


=== Reports ===
=== Reports ===
To submit results to a report server, check the box labelled 'Submit test results to a couchdb server' in the 'Preferences' dialog. By default the value will be http://mozmill-crowd.brasstacks.mozilla.com/db/, which is the preferred target for results.
To submit results to a report server, check the box labeled 'Submit test results to a couchdb server' in the 'Preferences' dialog. By default the value will be http://mozmill-crowd.brasstacks.mozilla.com/db/, which is the preferred target for results.


== Command Line ==
== Command Line ==
Line 28: Line 28:
   -a PATH, --addons=PATH    Addons to install
   -a PATH, --addons=PATH    Addons to install
   --delay=DELAY            Duration (in seconds) to wait before each iteration
   --delay=DELAY            Duration (in seconds) to wait before each iteration
  --entities=ENTITIES      Number of entities to create within a test snippet
   --iterations=ITERATIONS  Number of times to repeat each test snippet
   --iterations=ITERATIONS  Number of times to repeat each test snippet
   --logfile=PATH            Path to the log file
   --logfile=PATH            Path to the log file
  --micro-iterations=MICRO_ITERATIONS
                            Number of times to loop within each test snippet
   --no-restart              Do not restart application between tests
   --no-restart              Do not restart application between tests
   -r URL, --report=URL      Send results to the report server
   -r URL, --report=URL      Send results to the report server
Line 37: Line 36:
</pre>
</pre>


=== Micro-iterations ===
=== Entities ===
Each test snippet will be written such that it ends in the same state that it started. For example, a test that opens a new tab will also close the tab -- with the assumption that any resources consumed can potentially be released. For tests that use the micro-iterations it is possible to influence an accumulation of resources within the snippet. Using the open new tabs example, specifying a micro-iteration value of 10 would open ten tabs and then close them all within an iteration.
Each test snippet will be written such that it ends in the same state that it started. For example, a test that opens a new tab will also close the tab -- with the assumption that any resources consumed can potentially be released. For tests that use entities it is possible to influence an accumulation of resources within the snippet. Using the open new tabs example, specifying an entities value of 10 would open ten tabs and then close them all within an iteration.


=== Add-ons ===
=== Add-ons ===
Line 52: Line 51:
All Endurance Tests need to instantiate an <tt>EnduranceManager</tt> from the <tt>endurance.js</tt> shared-module. The only other requirement is that the test calls the run method, with a single argument. This argument is the function that will be repeated for each iteration.
All Endurance Tests need to instantiate an <tt>EnduranceManager</tt> from the <tt>endurance.js</tt> shared-module. The only other requirement is that the test calls the run method, with a single argument. This argument is the function that will be repeated for each iteration.


== Without Micro-iterations ==
== Without Entities ==


<pre class="brush:js;toolbar:false;">var Endurance = require("../../../lib/endurance");
<pre class="brush:js;toolbar:false;">var Endurance = require("../../../lib/endurance");
Line 71: Line 70:
</pre>
</pre>


== With Micro-iterations ==
== With Entities ==


<pre class="brush:js;toolbar:false;">var Endurance = require("../../../lib/endurance");
<pre class="brush:js;toolbar:false;">var Endurance = require("../../../lib/endurance");
Confirmed users
2,177

edits