Peptest

  • Revision slug: Peptest
  • Revision title: Peptest
  • Revision id: 63068
  • Created:
  • Creator: ahal
  • Is current revision? No
  • Comment 4 words added

Revision Content

Peptest is an automated test harness designed to test the responsiveness of the UI thread while various actions are performed. Tests are simple Javascript files which can optionally import Mozmill's driver to manipulate the user interface in an automated fashion.

The code is currently located at https://github.com/mozilla/peptest. Peptest is also checked in to Mozilla Central. Firefox tests can be added to the tests directory (don't forget to also add them to the manifest).

For a longer description of what 'unresponsiveness' actually means, see: http://blog.mozilla.com/ted/2011/06/27/measuring-ui-responsiveness/

Running Tests

For instructions on installing and running Peptest standalone from the command line see Using Peptest.

To run Peptest within Mozilla Central, first build Mozilla with your changes; then:

cd $(OBJDIR)
make peptest

This will run the default set of tests. To run a different test manifest or test file you can set the $TEST_PATH environment variable:

TEST_PATH=path/to/my/test/manifest make peptest

You can also add additional arguments to Peptest using the $EXTRA_TEST_ARGS environment variable:

EXTRA_TEST_ARGS="--log-level=DEBUG --profile-path=path/to/custom/profile" make peptest

Here is a full list of options that can be passed into the $EXTRA_TEST_ARGS environment variable:

Options:
  -t TESTPATH, --test-path=TESTPATH
                        path to the test manifest
  -b BINARY, --binary=BINARY
                        absolute path to application, overriding default
  --app=APP             app to run the tests on (firefox or thunderbird).
                        defaults to firefox

  --timeout=TIMEOUT     global timeout in seconds (with no output)
  --log-file=FILE       file to which logging occurs
  --log-level=LEVEL     one of DEBUG, INFO, WARNING, ERROR to determine the
                        level of logging
  --setenv=NAME=VALUE   sets the given variable in the application's
                        environment
  --browser-arg=ARG     provides an argument to the test application
  -p PROFILEPATH, --profile-path=PROFILEPATH
                        path to the profile to use. If none specified, a
                        temporary profile is created
  --server-port=SERVERPORT
                        The port to host test related files on
  --server-path=SERVERPATH
                        Starts a basic HTTP server rooted at the specified
                        directory. Can be used for hosting test related files
  --symbols-path=SYMBOLSPATH
                        absolute path to directory containing breakpad
                        symbols, or the URL of a zip file containing symbols
  --tracer-threshold=TRACERTHRESHOLD
                        time in milliseconds at which point an event is
                        considered unresponsive. Default to 50ms
  --tracer-interval=TRACERINTERVAL
                        interval in milliseconds that tracer events are sent
                        through the event loop. Default to 10ms

Revision Source

<p><a class="link-https" href="https://wiki.mozilla.org/Auto-tools/Projects/peptest">Peptest</a> is an <a href="/en/Mozilla_automated_testing" title="Mozilla automated testing">automated test harness</a> designed to test the responsiveness of the UI thread while various actions are performed. Tests are simple Javascript files which can optionally import <a href="/en/Mozmill" title="Mozmill">Mozmill's</a> driver to manipulate the user interface in an automated fashion.</p>
<p>The code is currently located at <a class="external free" href="https://github.com/mozilla/peptest" rel="nofollow">https://github.com/mozilla/peptest</a>. <a class="link-https" href="https://wiki.mozilla.org/Auto-tools/Projects/peptest">Peptest</a> is also checked in to <a class="external text" href="http://mxr.mozilla.org/mozilla-central/source/testing/peptest/" rel="nofollow">Mozilla Central</a>. Firefox tests can be added to the <a class="external text" href="http://mxr.mozilla.org/mozilla-central/source/testing/peptest/tests/firefox/" rel="nofollow">tests directory</a> (don't forget to also add them to the manifest).</p>
<p>For a longer description of what 'unresponsiveness' actually means, see: <a class="external free" href="http://blog.mozilla.com/ted/2011/06/27/measuring-ui-responsiveness/" rel="nofollow">http://blog.mozilla.com/ted/2011/06/27/measuring-ui-responsiveness/</a></p>
<h2 id="Running_Tests">Running Tests</h2>
<p>For instructions on installing and running Peptest standalone from the command line see <a class="link-https" href="https://wiki.mozilla.org/Auto-tools/Projects/peptest#Using_Peptest">Using Peptest</a>.</p>
<p>To run Peptest within Mozilla Central, first <a href="/En/Developer_Guide/Build_Instructions" title="en/Build_Documentation">build Mozilla</a> with your changes; then:</p>
<pre>cd $(OBJDIR)
make peptest
</pre>
<p>This will run the default set of tests. To run a different test manifest or test file you can set the $TEST_PATH environment variable:</p>
<pre>TEST_PATH=path/to/my/test/manifest make peptest
</pre>
<p>You can also add additional arguments to Peptest using the $EXTRA_TEST_ARGS environment variable:</p>
<pre>EXTRA_TEST_ARGS="--log-level=DEBUG --profile-path=path/to/custom/profile" make peptest
</pre>
<p>Here is a full list of options that can be passed into the $EXTRA_TEST_ARGS environment variable:</p>
<p><strong>Options:</strong><br>   -t TESTPATH, --test-path=TESTPATH<br>                         path to the test manifest<br>   -b BINARY, --binary=BINARY<br>                         absolute path to application, overriding default<br>   --app=APP             app to run the tests on (firefox or thunderbird).<br>                         defaults to firefox</p>
<p>  --timeout=TIMEOUT     global timeout in seconds (with no output)<br>   --log-file=FILE       file to which logging occurs<br>   --log-level=LEVEL     one of DEBUG, INFO, WARNING, ERROR to determine the<br>                         level of logging<br>   --setenv=NAME=VALUE   sets the given variable in the application's<br>                         environment<br>   --browser-arg=ARG     provides an argument to the test application<br>   -p PROFILEPATH, --profile-path=PROFILEPATH<br>                         path to the profile to use. If none specified, a<br>                         temporary profile is created<br>   --server-port=SERVERPORT<br>                         The port to host test related files on<br>   --server-path=SERVERPATH<br>                         Starts a basic HTTP server rooted at the specified<br>                         directory. Can be used for hosting test related files<br>   --symbols-path=SYMBOLSPATH<br>                         absolute path to directory containing breakpad<br>                         symbols, or the URL of a zip file containing symbols<br>   --tracer-threshold=TRACERTHRESHOLD<br>                         time in milliseconds at which point an event is<br>                         considered unresponsive. Default to 50ms<br>   --tracer-interval=TRACERINTERVAL<br>                         interval in milliseconds that tracer events are sent<br>                         through the event loop. Default to 10ms</p>
Revert to this revision