Adding a New Test
When a new feature is added to HOHQMesh it is best practice to add a (small) corresponding test case control file that exercises these new routines. Adding a new test is straightforward with the following procedure:
- Create a new control file, e.g.,
NewTestMesh.controland save it in the folder/Benchmarks/ControlFiles. This is the version of the control file that HOHQMesh will execute for testing. - In this new control file add the keyword "test file name" with an appropriate file path and name corresponding to the test
to the RUN_PARAMETERS block of the control file. For example, in
NewTestMesh.controlwill indicate that the benchmark information should be written to the filetest file name = /Benchmarks/BenchmarkData/NewTestMesh.txtNewTestMesh.txt. The file path/Benchmarks/BenchmarkDatais the expected path for the automated tests. - Generate the benchmark information by adding the
-generateTestflag, i.e.This will write the test benchmark file to the location requested in the previous step../HOHQMesh -generateTest -f Benchmarks/ControlFiles/NewTestMesh.control - Open the file
/Benchmarks/BenchmarkFiles.txtand add the new control file path to the list of test cases, e.g.,Benchmarks/ControlFiles/NewTestMesh.control
To execute the tests locally type
./HOHQMesh -test -path <pathToBenchmarks>
<pathToBenchmarks> is the path to the HOHQMesh directory. If you are inside the HOHQMesh directory, you can also omit the -path option, as it defaults to ..