User Tools

Site Tools


codesnippets:testingconventions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
codesnippets:testingconventions [2022/04/08 09:54] – [Modules] f2b216codesnippets:testingconventions [2025/10/08 00:48] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Testing conventions ====== ====== Testing conventions ======
-~~DISCUSSION~~ 
  
 ===== Setup with stack ===== ===== Setup with stack =====
Line 298: Line 297:
     * the complete set of possible test values/data is used in unit tests,      * the complete set of possible test values/data is used in unit tests, 
     * or values for all possible equivalence classes are used      * or values for all possible equivalence classes are used 
-    * or ramdom sample values/data from complete set of possible values/data is used in case of high-volume cases (QuickCheck)+    * or random sample values/data from complete set of possible values/data is used in case of high-volume cases (QuickCheck)
   * independence:   * independence:
-    * test method is independent from library functions that are under test,  +    * test methods are independent functions within the same library,  
-    * or dependent on tested functions +    * unless they depend on independent tested functions (if dependencies are not cyclic) 
-  * boundaries+  * edge cases
-    * corner cases and boundaries are tested by unit tests (HUnit)+    * edge cases are tested by unit tests (HUnit)
   * conform doc.:   * conform doc.:
     * all tests are conform to documentation, e.g. source code comments by haddock)     * all tests are conform to documentation, e.g. source code comments by haddock)
  
-After checking the abovementioned criteria, the result is documented as source code comment:+After checking the above mentioned criteria, the result is documented as source code comment:
   * <code>   * <code>
-{-  f1 +{-  * validated: ✅
-    * validated: ✅+
         * completeness:         * completeness:
         * independence:         * independence:
-        * boundaries  : ✅+        * edge cases  : ✅
         * conform doc.: ✅ -}         * conform doc.: ✅ -}
 tgUnitf1 :: T.TestTree tgUnitf1 :: T.TestTree
Line 347: Line 345:
 After checking the abovementioned criteria, the result is documented as source code comment: After checking the abovementioned criteria, the result is documented as source code comment:
   * <code>   * <code>
-{-  class A +{-  * validated: ✅
-    * validated: ✅+
         * documented: ✅         * documented: ✅
           * laws             : ✅           * laws             : ✅
Line 395: Line 392:
  
   * example: <code>   * example: <code>
-{- module A +{-  * validated: ✅
-    * validated: ✅+
         * documented: ✅         * documented: ✅
         * completeness: ✅ -}         * completeness: ✅ -}
Line 411: Line 407:
 </code> </code>
  
 +
 +===== ✎ =====
 +~~DISCUSSION~~
codesnippets/testingconventions.1649404441.txt.gz · Last modified: (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki