KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::Testing::Tester Class Reference

Tester class manages all tests and provide interface to run them. More...

#include <tester.h>

Collaboration diagram for Kratos::Testing::Tester:

Public Types

Enums
enum class  Verbosity {
  QUITE , PROGRESS , TESTS_LIST , FAILED_TESTS_OUTPUTS ,
  TESTS_OUTPUTS
}
 
Type Definitions
using TestCasesContainerType = std::map< std::string, TestCase * >
 
using TestSuitesContainerType = std::map< std::string, TestSuite * >
 

Public Member Functions

Operators
Testeroperator= (Tester const &rOther)=delete
 Preventing the assignment of the tests. More...
 
Input and output
virtual std::string Info () const
 Turn back information as a string. More...
 
virtual void PrintInfo (std::ostream &rOStream) const
 Print information about this object. More...
 
virtual void PrintData (std::ostream &rOStream) const
 Print object's data. More...
 

Static Public Member Functions

Operations
static void ResetAllTestCasesResults ()
 
static int RunAllTestCases ()
 
static int RunAllDistributedTestCases ()
 
static int ProfileAllTestCases ()
 
static int ProfileAllDistributedTestCases ()
 
static int RunTestSuite (std::string const &TestSuiteName)
 
static int ProfileTestSuite (std::string const &TestSuiteName)
 
static int RunTestCases (std::string const &TestCasesNamePattern)
 The test case pattern can apply * as any number of any character. More...
 
static int ProfileTestCases (std::string const &TestCasesNamePattern)
 The test case pattern can apply * as any number of any character. More...
 
static std::size_t NumberOfFailedTestCases ()
 
static std::size_t NumberOfSkippedTestCases ()
 
static void AddTestCase (TestCase *pHeapAllocatedTestCase)
 
static TestCaseGetTestCase (std::string const &TestCaseName)
 
static TestCasepGetTestCase (std::string const &TestCaseName)
 
static TestSuiteCreateTestSuite (std::string const &TestSuiteName)
 Creates a new test suite or return the already created one. More...
 
static TestSuiteCreateNewTestSuite (std::string const &TestSuiteName)
 This method gives an error if test suite already exists. More...
 
static void AddTestSuite (TestSuite *pHeapAllocatedTestSuite)
 
static TestSuiteGetTestSuite (std::string const &TestSuiteName)
 
static TestSuitepGetTestSuite (std::string const &TestSuiteName)
 
static void AddTestToTestSuite (std::string const &TestName, std::string const &TestSuiteName)
 This method creates the suite if is no exist. More...
 
Access
static TesterGetInstance ()
 
static void SetVerbosity (Verbosity TheVerbosity)
 
Inquiry
static bool HasTestCase (std::string const &TestCaseName)
 
static bool HasTestSuite (std::string const &TestSuiteName)
 

Life Cycle

 Tester (Tester const &rOther)=delete
 The Tester cannot be copied to avoid duplications. More...
 
virtual ~Tester ()
 Destructor. More...
 

Detailed Description

Tester class manages all tests and provide interface to run them.

Tester is a singletone class which registers the test cases and test suits and gives interface to register test cases and run all or some of them.

Member Typedef Documentation

◆ TestCasesContainerType

◆ TestSuitesContainerType

Member Enumeration Documentation

◆ Verbosity

Enumerator
QUITE 
PROGRESS 
TESTS_LIST 
FAILED_TESTS_OUTPUTS 
TESTS_OUTPUTS 

Constructor & Destructor Documentation

◆ Tester()

Kratos::Testing::Tester::Tester ( Tester const &  rOther)
delete

The Tester cannot be copied to avoid duplications.

◆ ~Tester()

Kratos::Testing::Tester::~Tester ( )
virtual

Destructor.

Member Function Documentation

◆ AddTestCase()

void Kratos::Testing::Tester::AddTestCase ( TestCase pHeapAllocatedTestCase)
static

This method assumes that the given test case is allocated via new. So it will delete it at the end of the program

◆ AddTestSuite()

void Kratos::Testing::Tester::AddTestSuite ( TestSuite pHeapAllocatedTestSuite)
static

This method assumes that the given test suite is allocated via new. So it will delete it at the end of the program

◆ AddTestToTestSuite()

void Kratos::Testing::Tester::AddTestToTestSuite ( std::string const &  TestName,
std::string const &  TestSuiteName 
)
static

This method creates the suite if is no exist.

◆ CreateNewTestSuite()

TestSuite * Kratos::Testing::Tester::CreateNewTestSuite ( std::string const &  TestSuiteName)
static

This method gives an error if test suite already exists.

◆ CreateTestSuite()

TestSuite * Kratos::Testing::Tester::CreateTestSuite ( std::string const &  TestSuiteName)
static

Creates a new test suite or return the already created one.

◆ GetInstance()

Tester & Kratos::Testing::Tester::GetInstance ( )
static

◆ GetTestCase()

TestCase & Kratos::Testing::Tester::GetTestCase ( std::string const &  TestCaseName)
static

◆ GetTestSuite()

TestSuite & Kratos::Testing::Tester::GetTestSuite ( std::string const &  TestSuiteName)
static

◆ HasTestCase()

bool Kratos::Testing::Tester::HasTestCase ( std::string const &  TestCaseName)
static

◆ HasTestSuite()

bool Kratos::Testing::Tester::HasTestSuite ( std::string const &  TestSuiteName)
static

◆ Info()

std::string Kratos::Testing::Tester::Info ( ) const
virtual

Turn back information as a string.

◆ NumberOfFailedTestCases()

std::size_t Kratos::Testing::Tester::NumberOfFailedTestCases ( )
static

◆ NumberOfSkippedTestCases()

std::size_t Kratos::Testing::Tester::NumberOfSkippedTestCases ( )
static

◆ operator=()

Tester& Kratos::Testing::Tester::operator= ( Tester const &  rOther)
delete

Preventing the assignment of the tests.

◆ pGetTestCase()

TestCase * Kratos::Testing::Tester::pGetTestCase ( std::string const &  TestCaseName)
static

◆ pGetTestSuite()

TestSuite * Kratos::Testing::Tester::pGetTestSuite ( std::string const &  TestSuiteName)
static

◆ PrintData()

void Kratos::Testing::Tester::PrintData ( std::ostream &  rOStream) const
virtual

Print object's data.

◆ PrintInfo()

void Kratos::Testing::Tester::PrintInfo ( std::ostream &  rOStream) const
virtual

Print information about this object.

◆ ProfileAllDistributedTestCases()

int Kratos::Testing::Tester::ProfileAllDistributedTestCases ( )
static

◆ ProfileAllTestCases()

int Kratos::Testing::Tester::ProfileAllTestCases ( )
static

◆ ProfileTestCases()

static int Kratos::Testing::Tester::ProfileTestCases ( std::string const &  TestCasesNamePattern)
static

The test case pattern can apply * as any number of any character.

◆ ProfileTestSuite()

int Kratos::Testing::Tester::ProfileTestSuite ( std::string const &  TestSuiteName)
static

◆ ResetAllTestCasesResults()

void Kratos::Testing::Tester::ResetAllTestCasesResults ( )
static

◆ RunAllDistributedTestCases()

int Kratos::Testing::Tester::RunAllDistributedTestCases ( )
static

◆ RunAllTestCases()

int Kratos::Testing::Tester::RunAllTestCases ( )
static

◆ RunTestCases()

int Kratos::Testing::Tester::RunTestCases ( std::string const &  TestCasesNamePattern)
static

The test case pattern can apply * as any number of any character.

◆ RunTestSuite()

int Kratos::Testing::Tester::RunTestSuite ( std::string const &  TestSuiteName)
static

◆ SetVerbosity()

void Kratos::Testing::Tester::SetVerbosity ( Verbosity  TheVerbosity)
static

The documentation for this class was generated from the following files: