-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcoverage.theory.txt
27 lines (22 loc) · 1.58 KB
/
coverage.theory.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
┏━━━━━━━━━━━━━━┓
┃ COVERAGE ┃
┗━━━━━━━━━━━━━━┛
GOAL ==> #Calculating:
# - number of runtime executions
# - i.e. also whether it was executed or not
# - of specific code structures (usually statements, lines, branches, functions, files)
#Usually done for test coverage
APPROACHES ==> #Add counters (VAR++) before each line of code
#Can either be:
# - by transforming source code
# - most performant
# - requires compile-step
# - by transforming bytecode
# - by adding it runtime
# - slowest
# - dynamic
FORMAT ==> #Dependent on vendor, or LCOV (see its doc)
#Often reported using HTML, text, etc.
SOURCE MAP ==> #Must be thought for two distincts reasons:
# - if test coverage transforms source code, this introduces a compile-step
# - if source code has a source map, coverage should use it to report source line|columns