Free cookie consent management tool by TermsFeed Policy Generator

Changes between Version 19 and Version 20 of Documentation/DevelopmentCenter/DeveloperGuidelines


Ignore:
Timestamp:
07/26/13 12:36:29 (11 years ago)
Author:
abeham
Comment:

Added information about unit tests

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/DevelopmentCenter/DeveloperGuidelines

    v19 v20  
    4040A source code example of well formatted !HeuristicLab code is available [wiki:DevelopersGuidelinesSourceExample here].
    4141
    42 === 2.4 Visual Studio Extensions & Addons === #vs_extensions
     42=== 2.4 Unit Tests ===
     43Unit 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
     45The 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
     52Each 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
    4368* [http://visualstudiogallery.msdn.microsoft.com/e5f41ad9-4edc-4912-bca3-91147db95b99/ PowersCommands for Visual Studio 2010]
    4469  * If you are working as core developer this extension must be installed with the options 'Format Document on save' and 'Remove and Sort Usings on save' enabled to ensure a consistent source code formatting.