| 42 | | === 2.4 Visual Studio Extensions & Addons === #vs_extensions |
| | 42 | === 2.4 Unit Tests === |
| | 43 | Unit Tests are to be included in a separate solution called `HeuristicLab 3.3 Tests.sln`. The project is organized into multiple folders corresponding to the namespaces. |
| | 44 | |
| | 45 | The naming convention for unit tests is `[Prefix] ClassName "Test" [MethodName] [CaseDescription]`. ClassName can be descriptive and also describe a group of classes (e.g. DeepCloneables), it does not need to correspond to the actual class name. Examples: |
| | 46 | * `DeepCloneablesTestClone` |
| | 47 | * `DeepCloneablesTestCloningConstructor` |
| | 48 | * `BinaryVectorSinglePointCrossoverTest` |
| | 49 | * `OnlineCalculatorsPearsonR2TestRandom` |
| | 50 | * `OnlineCalculatorsPearsonR2TestConstant` |
| | 51 | |
| | 52 | Each test can be categorized according to several dimensions: |
| | 53 | * Dimension 1 - via TestCategory attribute (required) |
| | 54 | * General |
| | 55 | * Algorithms.* |
| | 56 | * Encodings.* |
| | 57 | * Problems.* |
| | 58 | * Persistence |
| | 59 | * Samples.* |
| | 60 | * Dimension 2 via TestCategory attribute (optional) |
| | 61 | * Essential -> Tests are executed on the builder after each commit (should run reasonably fast) |
| | 62 | * Dimension 3 - via TestProperty("Time", "") attribute (required) |
| | 63 | * Short (ca. < 1s) |
| | 64 | * Medium (ca. < 10s) |
| | 65 | * Long (>= 10s) |
| | 66 | |
| | 67 | === 2.5 Visual Studio Extensions & Addons === #vs_extensions |