| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: module telemetry.story.story</title> |
| <meta charset="utf-8"> |
| </head><body bgcolor="#f0f0f8"> |
| |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| <tr bgcolor="#7799ee"> |
| <td valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.story.html"><font color="#ffffff">story</font></a>.story</strong></big></big></font></td |
| ><td align=right valign=bottom |
| ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/story/story.py">telemetry/story/story.py</a></font></td></tr></table> |
| <p><tt># Copyright 2015 The Chromium Authors. All rights reserved.<br> |
| # Use of this source code is governed by a BSD-style license that can be<br> |
| # found in the LICENSE file.</tt></p> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#aa55cc"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> |
| <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="re.html">re</a><br> |
| </td><td width="25%" valign=top><a href="telemetry.story.shared_state.html">telemetry.story.shared_state</a><br> |
| </td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ee77aa"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> |
| |
| <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> |
| <td width="100%"><dl> |
| <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> |
| </font></dt><dd> |
| <dl> |
| <dt><font face="helvetica, arial"><a href="telemetry.story.story.html#Story">Story</a> |
| </font></dt></dl> |
| </dd> |
| </dl> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="Story">class <strong>Story</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>A class styled on unittest.TestCase for creating story tests.<br> |
| <br> |
| Tests should override Run to maybe start the application and perform actions<br> |
| on it. To share state between different tests, one can define a<br> |
| shared_state which contains hooks that will be called before and<br> |
| after mutiple stories run and in between runs.<br> |
| <br> |
| Args:<br> |
| shared_state_class: subclass of telemetry.story.shared_state.SharedState.<br> |
| name: string name of this story that can be used for identifying this story<br> |
| in results output.<br> |
| labels: A list or set of string labels that are used for filtering. See<br> |
| story.story_filter for more information.<br> |
| is_local: If True, the story does not require network.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Story-AsDict"><strong>AsDict</strong></a>(self)</dt><dd><tt>Converts a story <a href="__builtin__.html#object">object</a> to a dict suitable for JSON output.</tt></dd></dl> |
| |
| <dl><dt><a name="Story-Run"><strong>Run</strong></a>(self, shared_state)</dt><dd><tt>Execute the interactions with the applications and/or platforms.</tt></dd></dl> |
| |
| <dl><dt><a name="Story-__init__"><strong>__init__</strong></a>(self, shared_state_class, name<font color="#909090">=''</font>, labels<font color="#909090">=None</font>, is_local<font color="#909090">=False</font>, make_javascript_deterministic<font color="#909090">=True</font>)</dt><dd><tt>Args:<br> |
| make_javascript_deterministic: Whether JavaScript performed on<br> |
| the page is made deterministic across multiple runs. This<br> |
| requires that the web content is served via Web Page Replay<br> |
| to take effect. This setting does not affect stories containing no web<br> |
| content or where the HTTP MIME type is not text/html.See also:<br> |
| _InjectScripts method in third_party/webpagereplay/httpclient.py.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>display_name</strong></dt> |
| </dl> |
| <dl><dt><strong>file_safe_name</strong></dt> |
| <dd><tt>A version of display_name that's safe to use as a filename.<br> |
| <br> |
| The default implementation sanitizes special characters with underscores,<br> |
| but it's okay to override it with a more specific implementation in<br> |
| subclasses.</tt></dd> |
| </dl> |
| <dl><dt><strong>id</strong></dt> |
| </dl> |
| <dl><dt><strong>is_local</strong></dt> |
| <dd><tt>Returns True iff this story does not require network.</tt></dd> |
| </dl> |
| <dl><dt><strong>labels</strong></dt> |
| </dl> |
| <dl><dt><strong>make_javascript_deterministic</strong></dt> |
| </dl> |
| <dl><dt><strong>name</strong></dt> |
| </dl> |
| <dl><dt><strong>serving_dir</strong></dt> |
| <dd><tt>Returns the absolute path to a directory with hash files to data that<br> |
| should be updated from cloud storage, or None if no files need to be<br> |
| updated.</tt></dd> |
| </dl> |
| <dl><dt><strong>shared_state_class</strong></dt> |
| </dl> |
| </td></tr></table></td></tr></table> |
| </body></html> |