RobotTestingFramework  2.0.1
Robot Testing Framework
TestListener.h
Go to the documentation of this file.
1 /*
2  * Robot Testing Framework
3  *
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 
22 #ifndef ROBOTTESTINGFRAMEWORK_TESTLISTENER_H
23 #define ROBOTTESTINGFRAMEWORK_TESTLISTENER_H
24 
27 
28 namespace robottestingframework {
29 
34 {
35 public:
39  TestListener() = default;
40 
44  virtual ~TestListener() = default;
45 
52  virtual void addReport(const Test* test, TestMessage msg)
53  {
54  }
55 
61  virtual void addError(const Test* test, TestMessage msg)
62  {
63  }
64 
70  virtual void addFailure(const Test* test, TestMessage msg)
71  {
72  }
73 
78  virtual void startTest(const Test* test)
79  {
80  }
81 
86  virtual void endTest(const Test* test)
87  {
88  }
89 
94  virtual void startTestSuite(const Test* test)
95  {
96  }
97 
102  virtual void endTestSuite(const Test* test)
103  {
104  }
105 
109  virtual void startTestRunner()
110  {
111  }
112 
116  virtual void endTestRunner()
117  {
118  }
119 };
120 
121 } // namespace robottestingframework
122 
123 #endif // ROBOTTESTINGFRAMEWORK_TESTLISTENER_H
virtual void endTestSuite(const Test *test)
This is called when a TestSuite is finished.
Definition: TestListener.h:102
virtual void addReport(const Test *test, TestMessage msg)
This is called to report any arbitrary message from tests.
Definition: TestListener.h:52
virtual void startTestRunner()
This is called when the TestRunner is started.
Definition: TestListener.h:109
virtual void endTestRunner()
This is called when the TestRunner is finished.
Definition: TestListener.h:116
virtual void addFailure(const Test *test, TestMessage msg)
This is called when a failure occurred during test run.
Definition: TestListener.h:70
The simplest form of a test unit.
Definition: Test.h:34
virtual void endTest(const Test *test)
This is called when a Test is finished.
Definition: TestListener.h:86
virtual void startTest(const Test *test)
This is called when a Test is started.
Definition: TestListener.h:78
virtual void addError(const Test *test, TestMessage msg)
This is called when an error occurred during test run.
Definition: TestListener.h:61
A formated message with details.
Definition: TestMessage.h:32
virtual ~TestListener()=default
TestListener destructor.
TestListener()=default
TestListener constructor.
virtual void startTestSuite(const Test *test)
This is called when a TestSuite is started.
Definition: TestListener.h:94
The base class of any test result listeners.
Definition: TestListener.h:33