Robot Framework Integrated Development Environment (RIDE)
visitor.py
Go to the documentation of this file.
1 # Copyright 2008-2015 Nokia Networks
2 # Copyright 2016- Robot Framework Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 
23 
24 from robotide.lib.robot.model import SuiteVisitor
25 
26 
27 
42  def visit_result(self, result):
43  if self.start_resultstart_result(result) is not False:
44  result.suite.visit(self)
45  result.statistics.visit(self)
46  result.errors.visit(self)
47  self.end_resultend_result(result)
48 
49  def start_result(self, result):
50  pass
51 
52  def end_result(self, result):
53  pass
54 
55  def visit_statistics(self, stats):
56  if self.start_statistics(stats) is not False:
57  stats.total.visit(self)
58  stats.tags.visit(self)
59  stats.suite.visit(self)
60  self.end_statistics(stats)
61 
62  def start_statistics(self, stats):
63  pass
64 
65  def end_statistics(self, stats):
66  pass
67 
68  def visit_total_statistics(self, stats):
69  if self.start_total_statistics(stats) is not False:
70  for stat in stats:
71  stat.visit(self)
72  self.end_total_statistics(stats)
73 
74  def start_total_statistics(self, stats):
75  pass
76 
77  def end_total_statistics(self, stats):
78  pass
79 
80  def visit_tag_statistics(self, stats):
81  if self.start_tag_statistics(stats) is not False:
82  for stat in stats:
83  stat.visit(self)
84  self.end_tag_statistics(stats)
85 
86  def start_tag_statistics(self, stats):
87  pass
88 
89  def end_tag_statistics(self, stats):
90  pass
91 
92  def visit_suite_statistics(self, stats):
93  if self.start_suite_statistics(stats) is not False:
94  for stat in stats:
95  stat.visit(self)
96  self.end_suite_statistics(stats)
97 
98  def start_suite_statistics(self, stats):
99  pass
100 
101  def end_suite_statistics(self, suite_stats):
102  pass
103 
104  def visit_stat(self, stat):
105  if self.start_stat(stat) is not False:
106  self.end_stat(stat)
107 
108  def start_stat(self, stat):
109  pass
110 
111  def end_stat(self, stat):
112  pass
113 
114  def visit_errors(self, errors):
115  self.start_errors(errors)
116  for msg in errors:
117  msg.visit(self)
118  self.end_errors(errors)
119 
120  def start_errors(self, errors):
121  pass
122 
123  def end_errors(self, errors):
124  pass
Interface to ease traversing through a test suite structure.
Definition: visitor.py:75
Abstract class to conveniently travel :class:~robot.result.executionresult.Result objects.
Definition: visitor.py:41
def end_suite_statistics(self, suite_stats)
Definition: visitor.py:101