2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file test_results_collector_console.h
18 * @author Marcin Niesluchowski (m.niesluchow@samsung.com)
20 * @brief Header file containing ConsoleCollector class declaration
23 #ifndef DPL_TEST_RESULTS_COLLECTOR_CONSOLE_H
24 #define DPL_TEST_RESULTS_COLLECTOR_CONSOLE_H
28 #include <dpl/test/statistic.h>
29 #include <dpl/test/test_results_collector.h>
34 class ConsoleCollector :
35 public TestResultsCollectorBase
38 static TestResultsCollectorBase* Constructor();
43 virtual void CollectCurrentTestGroupName(const std::string& name);
44 virtual void CollectResult(const std::string& id,
45 const FailStatus status = FailStatus::NONE,
46 const std::string& reason = "",
47 const bool& isPerformanceTest = true,
48 const std::chrono::system_clock::duration& performanceTime
49 = std::chrono::microseconds::zero(),
50 const std::chrono::system_clock::duration& performanceMaxTime
51 = std::chrono::microseconds::zero());
52 virtual void Finish();
54 void PrintfErrorMessage(const char* type,
55 const std::string& message,
57 void PrintfIgnoredMessage(const char* type,
58 const std::string& message,
60 void PrintStats(const std::string& title, const Statistic& stats);
63 std::map<std::string, Statistic> m_groupsStats;
64 std::string m_currentGroup;
70 #endif // DPL_TEST_RESULTS_COLLECTOR_CONSOLE_H