Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Automated


Defines

#define automated_run_tests()   CU_automated_run_tests()
 Deprecated (version 1).
#define set_output_filename(x)   CU_set_output_filename((x))
 Deprecated (version 1).

Functions

void CU_automated_run_tests (void)
 Run CUnit tests using the automated interface.
CU_ErrorCode CU_list_tests_to_file (void)
 Generate an xml file containing a list of all tests in all suites in the active registry.
void CU_set_output_filename (const char *szFilenameRoot)
 Set the root file name for automated test output files.
CU_ErrorCode automated_list_all_tests (CU_pTestRegistry pRegistry, const char *szFilename)
 Generate an xml listing of all tests in all suites for the specified test registry.
CU_ErrorCode initialize_result_file (const char *szFilename)
 Initialize the test results file generated by the automated interface.
CU_ErrorCode uninitialize_result_file (void)
 Finalize and close the results output file generated by the automated interface.
void automated_run_all_tests (CU_pTestRegistry pRegistry)
 Run the registered tests using the automated interface.
void automated_test_start_message_handler (const CU_pTest pTest, const CU_pSuite pSuite)
 Handler function called at start of each test.
void automated_test_complete_message_handler (const CU_pTest pTest, const CU_pSuite pSuite, const CU_pFailureRecord pFailure)
 Handler function called at completion of each test.
void automated_all_tests_complete_message_handler (const CU_pFailureRecord pFailure)
 Handler function called at completion of all tests in a suite.
void automated_suite_init_failure_message_handler (const CU_pSuite pSuite)
 Handler function called when suite initialization fails.

Variables

CU_pSuite f_pRunningSuite = NULL
 The running test suite.
char f_szDefaultFileRoot [] = "CUnitAutomated"
 Default filename root for automated output files.
char f_szTestListFileName [FILENAME_MAX] = ""
 Current output file name for the test listing file.
char f_szTestResultFileName [FILENAME_MAX] = ""
 Current output file name for the test results file.
FILE * f_pTestResultFile = NULL
 FILE pointer the test results file.
BOOL f_bWriting_CUNIT_RUN_SUITE = FALSE
 Flag for keeping track of when a closing xml tag is required.


Define Documentation

 
#define automated_run_tests  )     CU_automated_run_tests()
 

Deprecated (version 1).

Deprecated:
Use CU_automated_run_tests().

#define set_output_filename  )     CU_set_output_filename((x))
 

Deprecated (version 1).

Deprecated:
Use CU_set_output_filename().


Function Documentation

void automated_all_tests_complete_message_handler const CU_pFailureRecord  pFailure  )  [static]
 

Handler function called at completion of all tests in a suite.

Parameters:
pFailure Pointer to the test failure record list.

CU_ErrorCode automated_list_all_tests CU_pTestRegistry  pRegistry,
const char *  szFilename
[static]
 

Generate an xml listing of all tests in all suites for the specified test registry.

The output is directed to a file having the specified name.

Parameters:
pRegistry Test registry for which to generate list (non-NULL).
szFilename Non-NULL, non-empty string containing name for listing file.
Returns:
A CU_ErrorCode indicating the error status.

void automated_run_all_tests CU_pTestRegistry  pRegistry  )  [static]
 

Run the registered tests using the automated interface.

The specified registry is set as the active registry if it is not already. The actual test running is performed by CU_run_all_tests().

Parameters:
pRegistry The test registry to run.

void automated_suite_init_failure_message_handler const CU_pSuite  pSuite  )  [static]
 

Handler function called when suite initialization fails.

Parameters:
pSuite The suite for which initialization failed.

void automated_test_complete_message_handler const CU_pTest  pTest,
const CU_pSuite  pSuite,
const CU_pFailureRecord  pFailure
[static]
 

Handler function called at completion of each test.

Parameters:
pTest The test being run.
pSuite The suite containing the test.
pFailure Pointer to the 1st failure record for this test.

void automated_test_start_message_handler const CU_pTest  pTest,
const CU_pSuite  pSuite
[static]
 

Handler function called at start of each test.

Parameters:
pTest The test being run.
pSuite The suite containing the test.

void CU_automated_run_tests void   ) 
 

Run CUnit tests using the automated interface.

This functions sets appropriate callback functions, initializes the test output files, and calls the appropriate functions to list the tests and run them. If an output file name root has not been specified using CU_set_output_filename(), a generic root will be applied.

CU_ErrorCode CU_list_tests_to_file void   ) 
 

Generate an xml file containing a list of all tests in all suites in the active registry.

The output file will be named according to the most recent call to CU_set_output_filename(), or a default if not previously set.

Returns:
An error code indicating the error status.

void CU_set_output_filename const char *  szFileRoot  ) 
 

Set the root file name for automated test output files.

The strings "-Listing.xml" and "-Results.xml" are appended to the specified root to generate the filenames. If szFilename is empty, the function has no effect.

Parameters:
szFileRoot String containing root to use for file names.

CU_ErrorCode initialize_result_file const char *  szFilename  )  [static]
 

Initialize the test results file generated by the automated interface.

A file stream is opened and header information is written.

CU_ErrorCode uninitialize_result_file void   )  [static]
 

Finalize and close the results output file generated by the automated interface.


Variable Documentation

BOOL f_bWriting_CUNIT_RUN_SUITE = FALSE [static]
 

Flag for keeping track of when a closing xml tag is required.

CU_pSuite f_pRunningSuite = NULL [static]
 

The running test suite.

FILE* f_pTestResultFile = NULL [static]
 

FILE pointer the test results file.

char f_szDefaultFileRoot[] = "CUnitAutomated" [static]
 

Default filename root for automated output files.

char f_szTestListFileName[FILENAME_MAX] = "" [static]
 

Current output file name for the test listing file.

char f_szTestResultFileName[FILENAME_MAX] = "" [static]
 

Current output file name for the test results file.


Generated on Thu Apr 28 12:36:10 2005 for CUnit by  doxygen 1.3.9.1