RobotTestingFramework  2.0.1
Robot Testing Framework
ConsoleListener.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_CONSOLELISTENER_H
23 #define ROBOTTESTINGFRAMEWORK_CONSOLELISTENER_H
24 
26 
27 namespace robottestingframework {
28 
39 {
40 public:
48  ConsoleListener(bool verbose = false);
49 
55 
59  virtual ~ConsoleListener();
60 
67  void addReport(const Test* test, TestMessage msg) override;
68 
74  void addError(const Test* test, TestMessage msg) override;
75 
81  void addFailure(const Test* test, TestMessage msg) override;
82 
87  void startTest(const Test* test) override;
88 
93  void endTest(const Test* test) override;
94 
99  void startTestSuite(const Test* test) override;
100 
105  void endTestSuite(const Test* test) override;
106 
110  void startTestRunner() override;
111 
115  void endTestRunner() override;
116 
117 private:
118  bool verbose;
120 };
121 
122 } // namespace robottestingframework
123 
124 #endif // ROBOTTESTINGFRAMEWORK_CONSOLELISTENER_H
void hideUncriticalMessages()
hideUncriticalMessages hides the tests report messages and only shows the test assertion failure and ...
void endTest(const Test *test) override
This is called when a Test is finished.
void addError(const Test *test, TestMessage msg) override
This is called when an error occurred during test run.
void addFailure(const Test *test, TestMessage msg) override
This is called when a failure occurred during test run.
The simplest form of a test unit.
Definition: Test.h:34
A formated message with details.
Definition: TestMessage.h:32
ConsoleListener(bool verbose=false)
ConsoleListener constructor.
class ConsoleListener listens to any messages reported by the tests during the test run...
void startTest(const Test *test) override
This is called when a Test is started.
void startTestSuite(const Test *test) override
This is called when a TestSuite is started.
virtual ~ConsoleListener()
ConsoleListener destructor.
void endTestRunner() override
This is called when the TestRunner is finished.
void startTestRunner() override
This is called when the TestRunner is started.
void endTestSuite(const Test *test) override
This is called when a TestSuite is finished.
The base class of any test result listeners.
Definition: TestListener.h:33
void addReport(const Test *test, TestMessage msg) override
This is called to report any arbitrary message from tests.