Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: tools/telemetry/telemetry/user_story/shared_user_story_state.py

Issue 752883002: Revert of [Telemetry] Introduce shared_user_story_state for real. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5
6 class SharedUserStoryState(object):
7 """A class that manages the test state across multiple user stories.
8 It's styled on unittest.TestCase for handling test setup & teardown logic.
9
10 """
11
12 def __init__(self, test, options, user_story_set):
13 """ This method is styled on unittest.TestCase.setUpClass.
14 Override to do any action before running user stories that
15 share this same state.
16 Args:
17 test: a page_test.PageTest instance.
18 options: a BrowserFinderOptions instance that contains command line
19 options.
20 user_story_set: a user_story_set.UserStorySet instance.
21 """
22 pass
23
24 @property
25 def platform(self):
26 """ Override to return the platform which user stories that share this same
27 state will be run on.
28 """
29 raise NotImplementedError()
30
31 def WillRunUserStory(self, user_story):
32 """ Override to do any action before running each one of all user stories
33 that share this same state.
34 This method is styled on unittest.TestCase.setUp.
35 """
36 raise NotImplementedError()
37
38 def DidRunUserStory(self, results):
39 """ Override to do any action after running each of all user stories that
40 share this same state.
41 This method is styled on unittest.TestCase.tearDown.
42 """
43 raise NotImplementedError()
44
45 def GetTestExpectationAndSkipValue(self, expectations):
46 """ Return test expectation and skip value instance in case expectation
47 is 'skip'. This is run after WillRunUserStory and before RunUserStory.
48 """
49 raise NotImplementedError()
50
51 def RunUserStory(self, results):
52 """ Override to do any action before running each one of all user stories
53 that share this same state.
54 This method is styled on unittest.TestCase.run.
55 """
56 raise NotImplementedError()
57
58 def TearDownState(self, results):
59 """ Override to do any action after running multiple user stories that
60 share this same state.
61 This method is styled on unittest.TestCase.tearDownClass.
62 """
63 raise NotImplementedError()
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/user_story/__init__.py ('k') | tools/telemetry/telemetry/user_story/user_story_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698