Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • alya-testsuite alya-testsuite
  • Project information
    • Project information
    • Activity
    • Members
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • alyaalya
  • alya-testsuitealya-testsuite
  • Wiki
  • Manage the tolerances

Manage the tolerances · Changes

Page history
Update Manage the tolerancies authored Jul 23, 2019 by Damien Dosimont's avatar Damien Dosimont
Hide whitespace changes
Inline Side-by-side
Manage-the-tolerances.md 0 → 100644
View page @ 39f24b38
![Capture_d_écran_de_2019-07-23_17-21-46](uploads/6b5dc2c45cbfb6bedcd71cc8fff4c233/Capture_d_écran_de_2019-07-23_17-21-46.png)
This figure shows an example of tolerance issues
#### Tune the tolerance
This operation can be done modifying the `.json` associated with the test (tests are located in the tests directory of the svn directory).
In the section `comparisons` of the `.json` file, you will find a list of files that have to be compared.
For each file, there is a field "method" that is used to define how to compare the reference and the test result files.
##### "method": "absolute"
This method compares the absolute difference between two values: `|base-test|`.
The field "diff": [float] contains the maximum-allowed difference between two values. If `|base-test| > diff`, the test fails.
##### "method": "relative"
This method compares the relative difference between two values: `|(test-base)/base|` or `|(test-base)/test|` if `base=0`. The field "diff": [float] contains the maximum-allowed difference.
##### "method": "rounding"
This method is a bit more tricky. It determines approximately the number of significant digits that are taken into account when doing the comparison. This number is defined by the field "tolerance" : [integer]. More exactly, the formula is the following: `diff=base*10^-tolerance` with diff used as for the method absolute, excepted if `tolerance=0`. In this case, no difference is allowed at all.
##### Choose the right values
The web page specific to each test file can help you tune the method parameters diff or tolerance:
* MaxAbsDiff corresponds to the maximum absolute difference detected
* MaxRelDiff corresponds to the maximum relative difference detected
* MaxTol corresponds to the maximum tolerance detected
Generally speaking, we advise using the smallest possible value (biggest in the case of tolerance/rounding).
Start with the rounding method, which is more generic and fit with values of different ranges.
Correct tolerance is bigger than 6 (or 0 in the ideal case). If it's lower, you should use the absolute or the relative methods. If the differences remain significant, question yourself about the relevancy of your results.
\ No newline at end of file
Clone repository
  • Home
  • User
    • Basic information
    • Execute the Testsuite
    • Analyze the results
  • Developer
    • Adding/modifying tests workflow
    • Manage the tolerancies