# Test Format Support

- pluginname_process_tests
- pluginname_finalize_results
- Example

test-patch has the ability to support multiple test formats. Test formats have some extra hooks to process the output of test tools and write the results to some tables. Every test format plug-in must have one line in order to be recognized:

    add_test_format <pluginname>

Test format plugins can provide following two methods, which will be called by test-patch if defined.

## pluginname_process_tests

Given a path to the log file and tested module name, parse that file and store the test result into global variables and/or files.

## pluginname_finalize_results

Using the results stored by pluginname_process_tests, write them to the test result table and/or the footer table for reporting.

# Example

For an example of how to write a test-format plugin, you can look at junit plugin bundled in Apache Yetus.