Loading...
Searching...
No Matches
ConsoleListener.h
Go to the documentation of this file.
/*
* Robot Testing Framework
*
* Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ROBOTTESTINGFRAMEWORK_CONSOLELISTENER_H
#define ROBOTTESTINGFRAMEWORK_CONSOLELISTENER_H
#include <robottestingframework/TestListener.h>
namespace robottestingframework {
class ConsoleListener : public TestListener
{
public:
ConsoleListener(bool verbose = false);
void hideUncriticalMessages();
virtual ~ConsoleListener();
void addReport(const Test* test, TestMessage msg) override;
void addError(const Test* test, TestMessage msg) override;
void addFailure(const Test* test, TestMessage msg) override;
void startTest(const Test* test) override;
void endTest(const Test* test) override;
void startTestSuite(const Test* test) override;
void endTestSuite(const Test* test) override;
void startTestRunner() override;
void endTestRunner() override;
private:
bool verbose;
bool hideUncritical;
};
} // namespace robottestingframework
#endif // ROBOTTESTINGFRAMEWORK_CONSOLELISTENER_H
TestListener.h
robottestingframework::ConsoleListener::addReport
void addReport(const Test *test, TestMessage msg) override
This is called to report any arbitrary message from tests.
robottestingframework::ConsoleListener::startTestRunner
void startTestRunner() override
This is called when the TestRunner is started.
robottestingframework::ConsoleListener::startTest
void startTest(const Test *test) override
This is called when a Test is started.
robottestingframework::ConsoleListener::endTestSuite
void endTestSuite(const Test *test) override
This is called when a TestSuite is finished.
robottestingframework::ConsoleListener::ConsoleListener
ConsoleListener(bool verbose=false)
ConsoleListener constructor.
robottestingframework::ConsoleListener::verbose
bool verbose
Definition ConsoleListener.h:118
robottestingframework::ConsoleListener::endTest
void endTest(const Test *test) override
This is called when a Test is finished.
robottestingframework::ConsoleListener::hideUncriticalMessages
void hideUncriticalMessages()
hideUncriticalMessages hides the tests report messages and only shows the test assertion failure and ...
robottestingframework::ConsoleListener::startTestSuite
void startTestSuite(const Test *test) override
This is called when a TestSuite is started.
robottestingframework::ConsoleListener::endTestRunner
void endTestRunner() override
This is called when the TestRunner is finished.
robottestingframework::ConsoleListener::addError
void addError(const Test *test, TestMessage msg) override
This is called when an error occurred during test run.
robottestingframework::ConsoleListener::~ConsoleListener
virtual ~ConsoleListener()
ConsoleListener destructor.
robottestingframework::ConsoleListener::hideUncritical
bool hideUncritical
Definition ConsoleListener.h:119
robottestingframework::ConsoleListener::addFailure
void addFailure(const Test *test, TestMessage msg) override
This is called when a failure occurred during test run.
robottestingframework::TestListener::TestListener
TestListener()=default
TestListener constructor.
robottestingframework::TestMessage
A formated message with details.
Definition TestMessage.h:33
robottestingframework::Test
The simplest form of a test unit.
Definition Test.h:35
robottestingframework
Definition Arguments.h:25