{section: Writing Tests for HTCondor} Unit tests for HTCondor which are run on the batlab servers are present in the src/condor_tests directory. These tests are perl scripts with "run" extension. Some tests verify the functioning of various condor tools, while the remaining verify some condor functionality and require a running HTCondor. Each test has its own requirements for running HTCondor. The requirements are added in the test file itself as a comment in the following format: {code} #testreq: {endcode} ex. for cmd_q_shows-better-analyze.run, we need a running personal condor. This requirement is specified as a comment in the file. Such a hint should always start from a new line for the parser code in run_test.pl and nmi scripts to be successfully read. {code} #testreq: personal {endcode} Few tests, start condor themselves using boilerplate code as they want to run condor with custom configuration. To address this situation, we have added support for tests to specify test configuration in a here-document marked by CONDOR_TESTREQ_CONFIG. Such a here document is parsed only if it is between the ^#testreq and ^#endtestreq markers. {code} #testreq: personal my $config = <