RobotTestingFramework  2.0.1
Robot Testing Framework
TestRunner.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_TESTRUNNER_H
23 #define ROBOTTESTINGFRAMEWORK_TESTRUNNER_H
24 
27 
28 #include <vector>
29 
30 namespace robottestingframework {
31 
42 {
43 
44  typedef std::vector<Test*> TestContainer;
45  typedef std::vector<Test*>::iterator TestIterator;
46 
47 
48 public:
52  TestRunner();
53 
57  virtual ~TestRunner();
58 
63  void addTest(Test* test);
64 
69  void removeTest(Test* test);
70 
74  void reset();
75 
81  void run(TestResult& result);
82 
86  void interrupt();
87 
88 private:
89  TestContainer tests;
92 };
93 
94 } // namespace robottestingframework
95 
96 #endif // ROBOTTESTINGFRAMEWORK_TESTRUNNER_H
void interrupt()
interrupt interrupts the current test run
The TestResult class is used to deliver the test results including any error and failures produced by...
Definition: TestResult.h:43
void run(TestResult &result)
Run all the tests in the list.
void addTest(Test *test)
Adding a new test.
The simplest form of a test unit.
Definition: Test.h:34
std::vector< Test * > TestContainer
Definition: TestRunner.h:44
virtual ~TestRunner()
TestRunner destructor.
std::vector< Test * >::iterator TestIterator
Definition: TestRunner.h:45
The TestRunner class runs the tests added as TestCase or TestSuite.
Definition: TestRunner.h:41
void reset()
Clear the test list.
void removeTest(Test *test)
Remove a test.
TestRunner()
TestRunner constructor.