MQLUNIT
Public Member Functions | List of all members
MQLUNIT_XMLTestRunner Class Reference

Test runner that outputs results to the XML file compatible with JUnit report analysers. More...

Inheritance diagram for MQLUNIT_XMLTestRunner:
Inheritance graph
[legend]

Public Member Functions

 MQLUNIT_XMLTestRunner (string file)
 Constructor : create a new XML test runner. More...
 
 ~MQLUNIT_XMLTestRunner ()
 Destructor. More...
 
void addFailure (MQLUNIT_TestFailure *failure)
 Registeres a test failure. More...
 
void startSuite (MQLUNIT_Test *test)
 Test suite started event. More...
 
void endSuite (MQLUNIT_Test *test)
 Test suite ended event. More...
 
void startTest (MQLUNIT_Test *test, const string name)
 Test started event. More...
 
void endTest (MQLUNIT_Test *test, const string name)
 Test ended event. More...
 
bool run (MQLUNIT_Test *test)
 Run a test and output the result to the console. More...
 
- Public Member Functions inherited from MQLUNIT_TestRunner
virtual ~MQLUNIT_TestRunner ()
 Destructor. More...
 
- Public Member Functions inherited from MQLUNIT_TestListener
 MQLUNIT_TestListener ()
 Constructor. More...
 
virtual ~MQLUNIT_TestListener ()
 Destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MQLUNIT_TestRunner
string failureCountFormat (uint count) const
 

Detailed Description

Test runner that outputs results to the XML file compatible with JUnit report analysers.

Note
This runner's output is optimised for AppVeyor cloud CI.
See also
MQLUNIT_TestRunner

Constructor & Destructor Documentation

◆ MQLUNIT_XMLTestRunner()

MQLUNIT_XMLTestRunner::MQLUNIT_XMLTestRunner ( string  file)
inline

Constructor : create a new XML test runner.

Parameters
file: full path the file to write test results to (relative to MQL4/Files directory)

◆ ~MQLUNIT_XMLTestRunner()

MQLUNIT_XMLTestRunner::~MQLUNIT_XMLTestRunner ( )
inline

Destructor.

Member Function Documentation

◆ addFailure()

void MQLUNIT_XMLTestRunner::addFailure ( MQLUNIT_TestFailure failure)
virtual

Registeres a test failure.

Parameters
failure: failure details
See also
MQLUNIT_TestFailure

Implements MQLUNIT_TestListener.

◆ endSuite()

void MQLUNIT_XMLTestRunner::endSuite ( MQLUNIT_Test test)
virtual

Test suite ended event.

Parameters
test: test case reference

Implements MQLUNIT_TestListener.

◆ endTest()

void MQLUNIT_XMLTestRunner::endTest ( MQLUNIT_Test test,
const string  name 
)
virtual

Test ended event.

Parameters
test: test case reference
name: name of a test

Implements MQLUNIT_TestListener.

◆ run()

bool MQLUNIT_XMLTestRunner::run ( MQLUNIT_Test test)
virtual

Run a test and output the result to the console.

Parameters
test: a test to run
Returns
true, if all tests succeeded, false if there were failures
See also
MQLUNIT_Test

Implements MQLUNIT_TestRunner.

◆ startSuite()

void MQLUNIT_XMLTestRunner::startSuite ( MQLUNIT_Test test)
virtual

Test suite started event.

Parameters
test: test case reference

Implements MQLUNIT_TestListener.

◆ startTest()

void MQLUNIT_XMLTestRunner::startTest ( MQLUNIT_Test test,
const string  name 
)
virtual

Test started event.

Parameters
test: test case reference
name: name of a test

Implements MQLUNIT_TestListener.


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

Copyright © 2017 Eneset Group Trust