| |
- __builtin__.object
-
- Story
class Story(__builtin__.object) |
|
A class styled on unittest.TestCase for creating story tests.
Tests should override Run to maybe start the application and perform actions
on it. To share state between different tests, one can define a
shared_state which contains hooks that will be called before and
after mutiple stories run and in between runs.
Args:
shared_state_class: subclass of telemetry.story.shared_state.SharedState.
name: string name of this story that can be used for identifying this story
in results output.
labels: A list or set of string labels that are used for filtering. See
story.story_filter for more information.
is_local: If True, the story does not require network. |
|
Methods defined here:
- AsDict(self)
- Converts a story object to a dict suitable for JSON output.
- Run(self, shared_state)
- Execute the interactions with the applications and/or platforms.
- __init__(self, shared_state_class, name='', labels=None, is_local=False, make_javascript_deterministic=True)
- Args:
make_javascript_deterministic: Whether JavaScript performed on
the page is made deterministic across multiple runs. This
requires that the web content is served via Web Page Replay
to take effect. This setting does not affect stories containing no web
content or where the HTTP MIME type is not text/html.See also:
_InjectScripts method in third_party/webpagereplay/httpclient.py.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- display_name
- file_safe_name
- A version of display_name that's safe to use as a filename.
The default implementation sanitizes special characters with underscores,
but it's okay to override it with a more specific implementation in
subclasses.
- id
- is_local
- Returns True iff this story does not require network.
- labels
- make_javascript_deterministic
- name
- serving_dir
- Returns the absolute path to a directory with hash files to data that
should be updated from cloud storage, or None if no files need to be
updated.
- shared_state_class
| |