SETestErrorStatistics.h
1 /* Distributed under the Apache License, Version 2.0.
2  See accompanying NOTICE file for details.*/
3 
4 #pragma once
5 class SETestCase;
6 class SETestSuite;
7 
8 // This data class is intended for use in array based data
9 // Each value in the array is compared and can be tracked
10 // and this provides a summary of how many values in the array
11 // were wrong and some statistics to go along with all of those errors
12 class CDM_DECL SETestErrorStatistics : public Loggable
13 {
14  friend class PBTestReport;//friend the serialization class
15  friend SETestCase;
16  friend SETestSuite;
17 protected:
19 public:
20  virtual ~SETestErrorStatistics();
21 
22  virtual void Reset(); //reset values
23  virtual void Clear(); //clear memory
24 
25  void SetPropertyName(const std::string& PropertyName);
26  std::string GetPropertyName() const;
27 
28  void SetComputedPropertyID(const std::string& ComputedPropertyID);
29  std::string GetComputedPropertyID() const;
30 
31  void SetExpectedPropertyID(const std::string& ExpectedPropertyID);
32  std::string GetExpectedPropertyID() const;
33 
34  void SetNumberOfErrors(int NumberOfErrors);
35  int GetNumberOfErrors() const;
36 
37  void SetMinimumError(double MinimumError);
38  double GetMinimumError() const;
39 
40  void SetMaximumError(double MaximumError);
41  double GetMaximumError() const;
42 
43  void SetAverageError(double AverageError);
44  double GetAverageError() const;
45 
46  void SetStandardDeviation(double StandardDeviation);
47  double GetStandardDeviation() const;
48 
49  void AddDifference(const std::string& difference);
50  const std::vector<std::string>* GetDifferences() const;
51 
52  // This a histogram that shows a percent tolerance and how many errors fall with in each bin
53  bool HasPercentTolerancevsNumErrorsHistogram() const;
54  SEFunction& GetPercentToleranceVsNumErrorsHistogram();
55  void SetPercentToleranceVsNumErrorsHistogram(SEFunction* PercentToleranceVsNumErrors);
56 
57 protected:
64  std::string m_PropertyName;
65  std::string m_ComputedPropertyID;
66  std::string m_ExpectedPropertyID;
68  std::vector<std::string> m_Differences;
69 };
Definition: Logger.h:23
Definition: Logger.h:71
Definition: PBTestReport.h:11
Definition: SEFunction.h:8
Definition: SETestCase.h:9
Definition: SETestErrorStatistics.h:13
double m_MinimumError
Definition: SETestErrorStatistics.h:59
double m_MaximumError
Definition: SETestErrorStatistics.h:60
std::string m_ExpectedPropertyID
Definition: SETestErrorStatistics.h:66
std::vector< std::string > m_Differences
Definition: SETestErrorStatistics.h:68
double m_PercentTolerance
Definition: SETestErrorStatistics.h:63
std::string m_PropertyName
Definition: SETestErrorStatistics.h:64
friend SETestCase
Definition: SETestErrorStatistics.h:15
friend SETestSuite
Definition: SETestErrorStatistics.h:16
double m_StandardDeviation
Definition: SETestErrorStatistics.h:62
double m_AverageError
Definition: SETestErrorStatistics.h:61
int m_NumberOfErrors
Definition: SETestErrorStatistics.h:58
SEFunction * m_PercentToleranceVsNumErrorsHistogram
Definition: SETestErrorStatistics.h:67
std::string m_ComputedPropertyID
Definition: SETestErrorStatistics.h:65
Definition: SETestSuite.h:10

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.