SmartTester  2.0.0
Smart Tester is unit testing and regression testing framework used for testing SmartCGMS system.
LogUtils.h
1 //
2 // Author: markovd@students.zcu.cz
3 //
4 
5 #ifndef SMARTTESTER_LOGUTILS_H
6 #define SMARTTESTER_LOGUTILS_H
7 
8 #include <string>
9 #include <vector>
10 #include <rtl/referencedImpl.h>
11 #include <utils/string_utils.h>
12 #include "Logger.h"
13 #include "constants.h"
14 #include "UnitTestExecUtils.h"
15 
16 namespace logs {
17 
19  void printResult(const HRESULT result);
21  void printTestStartInfo(const std::wstring& testName);
23  void printEntityTestsStartInfo(const std::wstring& entityName, const std::wstring& entityType);
25  void errorLogLine(const std::vector<std::string>& line);
27  void infoLogLine(const std::vector<std::string> &line);
29  void infoLogLines(const std::vector<std::vector<std::string>>& lines);
31  void printAndEmptyErrors(const refcnt::Swstr_list& errors);
33  void logConfigurationError(const tester::FilterConfig &config, HRESULT expected, HRESULT result);
35  std::size_t getLoggedLinesCount(const std::string& logFilePath);
42  std::vector<std::vector<std::string>> readLogFile(const std::string& logPath);
50  bool compareLines(const std::vector<std::string>& resultLogLine, const std::vector<std::string>& referenceLogLine);
51 
52 }
53 
54 #endif //SMARTTESTER_LOGUTILS_H
tester::FilterConfig
Definition: FilterConfiguration.h:14